xlsx to txt

Hello!

I need to know how can I convert a xlsx file into a txt. If you know a kind of library or a piece of code...

Thank you!
Microsoft Excel already can save files as plain text (and you can change the extension to whatever you want afterwards). Why do you need a separate program to do this?
If some reason you need to do the conversion without Excel:

You could pay for LibXL

LibXL
http://www.libxl.com/
Direct reading and writing Excel files

Or you could do it yourself; an xslx is "just" zipped up xml files. You will need to unzip the files and then parse the XML files, rewriting the data to csv format or whatever.

If you want to investigate, your can use any zip utility whch understands the standard zip format to extract the contents of a xslx file. And the XML format is well documented.

Office Open XML
http://en.wikipedia.org/wiki/Office_Open_XML
(follow link to the relevant standards)

Andy

PS There is an open source project working on a library, but as they're only at release 0.0.3 is looks like the project is very young.
http://libopc.codeplex.com/
Last edited on
Thank you, andywestken!

LB, I need to convert the file in program, because is a part of a larger project and I don't want to put the users to do this themselves.
Topic archived. No new replies allowed.