Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Parsing Excel files with Python 3.x

I have found very few libraries in Python able to parse excel files, and none of them were in Python 3.x nor passed with success the 2to3 step.

What would be your suggestions ?

like image 452
Guillaume Lebourgeois Avatar asked Feb 20 '11 13:02

Guillaume Lebourgeois


3 Answers

xlsxwriter is a good tool I've found, and practically the only one for Python 3 that hasn't been discontinued. I know it works well with both Linux and Windows--LibreOffice in both Linux and Windows, and Excel in Windows.

like image 28
Fred Barclay Avatar answered Oct 03 '22 03:10

Fred Barclay


Have a look at Python Package Index (Pypi), section Python 3 . xlrd3 is a port of xlrd, a python 2.x lib to parse Excel files.

like image 169
Scharron Avatar answered Oct 03 '22 01:10

Scharron


My suggestion would be to contact the authors of the libraries and help port them. It's not horribly hard and quite fun! Your only other option is to use Python 2, and that is obviously not as fun. :)

Possibly you could export to CSV as well, but I guess you would have if that was an option.

like image 29
Lennart Regebro Avatar answered Oct 03 '22 02:10

Lennart Regebro