I tried the Use Spreadsheet::WriteExcel but I get an error saying "Cant locate Spreadsheet/WriteExcel.pm", any idea what this is about? ---------------- Im trying to filter certain words in a text file by pushing all the lines that contain the word into an excel sheet. Now what I would like is for the word (that needed to be searched) to be highlighted in the excel sheet. Say for example, in a document I want to filter out the word "Complex" and push all the lines containing this word to an excel sheet. I want the word "Complex" to be highlighted in the Excel sheet. Any ideas or suggestions would be greatly appreciated. My code is given below.
print "Enter the filename\n"; $filename=<STDIN>; print "Enter the identifier:\n"; $ident=<STDIN>; chomp($ident); open FIN, $filename or warn("$filename $!"); open FOUT, ">result.xls" or warn ("result.xls $i"); while($line= <FIN>) { if($line=~/$ident/) { @flds = split(/\s+/, $line); $number= @flds; for($j=0;$j<=$number;$j++) { print FOUT $flds[$j], "\n"; } print FOUT "*************NEXT ENTRY*************** +**", "\n"; } } print $ident; print "LOG ANALYSIS FOUND IN FILE RESULT.XLS! \n"; close FIN; close FOUT;

In reply to Color highlighting in Excel by imperl

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post, it's "PerlMonks-approved HTML":



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.