3 ms·
xlhtml will work for .xls files. I'm not aware of one utility that will read out the text reliably from all MS formats though. I've been pondering this same p
by pmorici 18y ago
xlhtml will work for .xls files. I'm not aware of one utility that will read out the text reliably from all MS formats though. I've been pondering this same problem as of late and have been thinking about a virtual machine approach.
have a conversion "service" running in a Windows VM that has the latest office installed. Use something like Python with the pywin32 module to extract text via COM.
Advantage there is you don't have to worry about your thing breaking with new releases of Office, you just upgrade to the latest version.
Disadvantage obviously, the overhead of the VM cost of a windows and office license and need to role back the vm snapshot from time to time if you get any viruses.
- nickb 18y agoI'm hoping there's a way to automate it through OO.o... I'm pretty sure you can run it headless.
- etal 18y agoYes, or install python-uno for a nicer API: http://udk.openoffice.org/python/python-bridge.html http://udk.openoffice.org/python/python-bridge.html
- bootload 18y ago"... I'm hoping there's a way to automate it through OO.o. ..." Try http://search.cpan.org/dist/OpenOffice-OODoc/ http://search.cpan.org/dist/OpenOffice-OODoc/ and http://search.cpan.org/dist/OpenOffice-OODoc/OODoc/Intro.pod http://search.cpan.org/dist/OpenOffice-OODoc/OODoc/Intro.pod I've had some success parsing Open Office docs & word docs to text. Be prepared to parse XML and read the spec.
- iamelgringo 18y agoWould this work? http://www.artofsolving.com/opensource/pyodconverter http://www.artofsolving.com/opensource/pyodconverter
- iamelgringo 18y agoOr maybe you could hack somthing together with twill and this site: http://www.zamzar.com/conversionTypes.php http://www.zamzar.com/conversionTypes.php