Join GitHub today
GitHub is home to over 28 million developers working together to host and review code, manage projects, and build software together.Sign up
save_as from xlsx to csv: error array index out of range #20
When I tried to use the code above to save the attached file as a csv file in python 3, the following error occurred:
For Test2.xlsx, it seems to work with latest tool setup:
Here's what I got:
Here's my pip packages:
For Test2_edited.xlsx, it was better:
By the way, for xlsx, you need not to import pyexcel.ext.xls.
I updated all the pyexcel packages,
It should be noted that using the original code and the original xlsx file,
we still get
then, excluding the import, as you indicated,
the output is,
and, despite the warning, the output is OK!.
So it appears that including the import,
pyexcel.xlx lib tries to process the xlsx file and ultimately calls xlrd and that is when the error occurs.
Aha.. python 3. I haven't get one at hand. Will try it later. Looking at the tracback, it is related xlrd.
Can you try the following code instead?
because pyexcel.ext.xls can read xlsx, as well as pyexcel.ext.xlsx, which uses openpyxl.
If you want to keep xls support along with xlsx, you can do this:
So the second import will overwrite the first one. I will try to address this problem in future version of pyexcel-io v0.2.0.