You will have a difficult time with this project as you have it planned. First, I don't think Excel is the best choice for you to store the results. If you have that much data you will exceed the 65000 row limit in Excel 97 and if you used Excel 2007 format the file will be very slow to process. Second, the term line is a difficult one to define as RTF does not have a character limit for its paragraphs. so at best you can capture the number of the paragraph the "keyword" is located in. Unless you can force each "line" to be 80 characters in mono-spaced font.

It is best to "Ask" for help by showing us what you have attempted already along with a sample of the data you plan to process. Best of luck learning Perl as it is a wonderful language to use. All of what you need to do this project can be found here at the monastery if you know where to look for it.


In reply to Re: Search a text file for a keyword, and create Excel file output by rpnoble419
in thread Search a text file for a keyword, and create Excel file output by hyu968

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.