openpyxl icon indicating copy to clipboard operation
openpyxl copied to clipboard

Question: What is the maximum of rows in a excel-sheet opened by openpyxl?

Open ansim58 opened this issue 2 years ago • 1 comments

Hi there, i have an excel-sheet (.xslx) with more than 1.000.000 rows. Openpyxl reports max_row = 0 What is the maximum number openpyxl can handle? Thanks a lot! Andreas

ansim58 avatar Oct 04 '22 12:10 ansim58

The maximum number of rows it can handle is 1, 048, 576 rows. If you go outside this limit, it raises an exception: 'ValueError: Row numbers must be between 1 and 1048576'. This is also the limit for any excel sheet. What you could do is you can split the data into multiple sheets.

id-hkj avatar Mar 16 '24 21:03 id-hkj