Openpyxl load_workbook and save take too long

openpyxl, python

Solution

So I created a 67k row excel sheet with only 4 columns and random decimal data - and the sheet was almost 5MB, so >1000x what you said in your question. Given that this is a decent amount of data I would suggest using the optimized reader, not the normal one. Here's a link to the tutorial:

https://openpyxl.readthedocs.org/en/latest/optimized.html

Hopefully this helps!

Problem

The following lines take 45 seconds the first, and over a minute and a half the second. Something.xls is 4 MB big and the changes are minor. Is there something wrong? ``` something = openpyxl.load_workbook('Something.xlsx') something.save('Something.xlsx') ``` Some details: I'm using Python 2.7.3 on Windwos 7, the workbook has 2 sheets the first of which has 67610 rows, I'm not accesing any network to do this job.

Original source