dimanche 29 mars 2015

can python xlrd change a column type in an .xlsx file

I want to use xlrd to read an set of .xlsx files created by someone else who unfortunately incorrectly formatted a column in Excel. The column is a section label (text) such as 1.2.3.4. but it's formated as a date. It displays OK in Excel, but when I try to read it in using xlrd it is read in as a date. I tried "converters={'Section': str}", but got an error


OverflowError: normalized days too large to fit in a C int


(the cell in question had no entry.)


I have read around a bit, but can't find a good way of fixing the .xlsx file so that the columns have the right datatype.


How do I fix or read the .xlsx file so that I can read the right datatype without errors.


Aucun commentaire:

Enregistrer un commentaire