All Courses

error - output exceeds the size limit

By, 3 months ago
  • Bookmark

Getting this error - output exceeds the size limit even after installing openpyxl

2 Answers

Restart kernel


This error message typically occurs when you are trying to write a large amount of data to an Excel file using the openpyxl library in Python, and the file exceeds the maximum size that the library can handle.

This can happen when there are a large number of rows or columns in the data you are trying to write, or when the data contains very large cells with a lot of text.

You have a few options to work around this issue.

  1. Reduce the size of the data you are trying to write by filtering out unnecessary rows or columns, or by truncating the data in large cells.
  2. Increase the openpyxl library's maximum file size by setting the constant_memory option to True when you create the Workbook object.
  3. Alternatively, you can opt for other libraries like xlsxwriter or pyexcelerate
  4. Instead of storing the entire data on sheet, you can split data into multiple sheet.

Your Answer


Live Masterclass on : "How Machine Get Trained in Machine Learning?"

Mar 30th (7:00 PM) 516 Registered
More webinars

Related Discussions

Running random forest algorithm with one variable

View More