dilshod/xlsx2csv — Issue #12: fails on large xlsx files
Author: AlexDr
Created: 2012-03-08 22:07:02+00:00
State: open

I am trying to convert some large xlsx files in the range of 60,000 to 85,000 lines.
The program fails with the error:

$ xlsx2csv.py -s 1 60656.xlsx 60656.csv
Traceback (most recent call last):
File "/home/Alex/mybin/xlsx2csv.py", line 412, in
xlsx2csv(args[0], outfile, **kwargs)
File "/home/Alex/mybin/xlsx2csv.py", line 98, in xlsx2csv
workbook = parse(ziphandle, Workbook, "xl/workbook.xml")
File "/home/Alex/mybin/xlsx2csv.py", line 125, in parse
instance.parse(ziphandle.read(filename))
File "/home/Alex/mybin/xlsx2csv.py", line 135, in parse
self.appName = workbookDoc.firstChild.getElementsByTagName("fileVersion")[0]._attrs['appName'].value
IndexError: list index out of range

I am using python 2.7 under linux.
I have tested the script with other xlsx files (smaller) and had no issus.

Thanks
Alex.