Dear fellow monks,

I need to extract some textual information from a large bunch of MS Word files, mostly at the .doc format (i.e. Office 2003 version or before, if I remember correctly); there also may be some .docx files but let's concentrate on the .doc format for now.

This is quite new to me, I've never had before to do that, and I am usually not working on Windows platform and Microsoft Office document formats, except for a few cases with Excel documents. So I am not sure how to handle this requirement.

I also found that there seem to be surprisingly few CPAN solutions for extracting data from MS Word documents (especially in the pre-2003 format).

The Text::Extract::Word module may be doing what I need, but it has a dependency on the OLE::Storage_Lite module (and perhaps some others). My understanding is the OLE::... domain modules will only work on Windows boxes (because they are presumably using Windows and/or MS Office libraries). Is this a correct assumption? If such is the case, then it would be a problem for us, because, ultimately, the whole much larger process should run on a Linux server.

Does any monk here have some experience on this type of needs, i.e., to summarize, how to extract textual data from MS Word files (pre-2003 format) on a Linux box, where OLE modules would presumably not run? Any suggestions? Any other module that I overlooked? Thank you very much for any help in this respect.


In reply to Extracting text from MS Word files on a Linux box by Laurent_R

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.