Skip to content Skip to sidebar Skip to footer

How To Fix Size Exceeds Expected In Python 3

I am trying to loop over Excel files with python pandas. First I'm saving them to csv and then I open them again, slice and then saving them again. But I get an error: 'Workbook:

Solution 1:

I could fix this exact error by just opening the problematic Excel file in Excel and simply saving it.

After that I could import the file in Pandas without the error.

In my case I suspect that this error results from a platform inconsistancy in Excel between Windows (where my source files were generated) and Mac OS (where I import the files).

Solution 2:

I think you may have a cell that has more than 255 characters in it.

See this article about data and file size limitations: http://kb.tableau.com/articles/knowledgebase/jet-data-file-size-limitations

Solution 3:

Consider using openpyxl to open your Excel files instead.

It seems that pandas uses xlrd to read excel files and xlrd raises an error if it feels something is wrong about reading the file... which is what happened to you.

xlrd is no longer maintained as of Jan 2020.

Post a Comment for "How To Fix Size Exceeds Expected In Python 3"