Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

Not sure about standalone OOXML converters, but there's a widely ported command-line utility called antiword for converting .doc format to text:

http://www.winfield.demon.nl/

OO.o 3.0 is supposed to have OOXML import included (it's a separate extension in 2.x), so using the UNO bindings or possibly some command-line flags, OpenOffice.org may be able to do some justice to .docx.

But if all you want is the text from an OOXML file, formatting be damned, it's actually straightforward to code (just like ODF):

1. Unzip the file to get its component XML files

2. Read content.xml (or whatever the OOXML equivalent is)

3. Parse the XML and extract the text content of every node (e.g. make a list of the strings).

4. Spit that back out, search it, etc.



Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: