Memory error using openpyxl and large data excels

后端 未结 4 1762
失恋的感觉
失恋的感觉 2021-01-04 23:32

I have written a script which has to read lot of excel files from a folder (around 10,000). This script loads the excel file (some of them has more than 2,000 rows) and read

4条回答
  •  长发绾君心
    2021-01-04 23:51

    With recent versions of openpyxl one has to load and read huge source workbook with read_only=True argument, and create / write huge destination workbook with write_only=True mode:

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

提交回复
热议问题