News for hackers. Stuff that matters.
Re:I made a native Python module for MS Word docx by benatkin on Wednesday December 30, 2009 @11:05AM (#1022600)
Thanks! I've had to deal with docx files from time to time. I'm going to try this out.

Does anyone know of a good way to read xlsx files with Python? I think I tried one library and it didn't quite work for this 20,000 row file, and I wound up using OpenOffice to convert it to csv. If not, hopefully this can be used as a starting point for developing a nice xlsx library.

Re:I made a native Python module for MS Word docx by brendano on Wednesday December 30, 2009 @04:16PM (#1023245)
I wrote the following python script to read xlsx. It's extremely basic, but works very well for me.

http://github.com/brendano/tsvutils/blob/master/xlsx2tsv

I've never tried it on a 20,000 row file. I suspect it would work. A really large file might need to switch to a streaming XML parser, but probably Excel itself wouldn't handle that use case too well.