Posted 9 April 2025, 4:30 am EST
Hi,
The issue you mentioned seems not a limitation of SpreadJS, but rather the limitation of the browser. When attempting to load such a large file in SpreadJS, it fails to load and throws an Incorrect file format error, rejecting the loading of the file in SpreadJS.
While SpreadJS itself does not impose file size limitations for importing files, its performance depends on browser memory availability. Even a 5MB file might consume significantly more memory once loaded into SpreadJS, as the workbook’s memory usage depends on factors like the number of formulas, data volume, formatting, etc. As a result, crashes or failures can occur based on content rather than file size alone.
Additionally, we would recommend you load the file with incremental or lazy mode. In “Incremental” mode, the user can perform UI operations while the file is being loaded in the SpreadJS. The file is only loaded when a user does not perform any UI operations. On the other hand, when the file is loaded with “Lazy” mode, only the minimal and necessary data is loaded at first, and other data is loaded in the background and when needed. This makes it faster to load big Excel files.
We have updated the shared sample to load the Excel file incrementally. Please refer to the sample - https://jscodemine.mescius.io/share/NoOsF2jSp0OlWQdh8zxTDQ/?defaultOpen={"OpenedFileName"%3A["%2Findex.html"%2C"%2Fapp.js"]%2C"ActiveFile"%3A"%2Fapp.js"}.
You can also try to open the file in lazy open mode. Please refer to the OpenMode enumeration (https://developer.mescius.com/spreadjs/api/enums/GC.Spread.Sheets.OpenMode#enumeration-openmode) to learn about all the open modes supported in SpreadJS.
You can share the file by uploading the file to the cloud (eg, Google Drive) and sharing the accessible link with us. In case the file contains confidential data, you can create a new support ticket on our private portal - https://developer.mescius.com/my-account/my-support and upload the file there.
Please feel free to reach out if you encounter any further issues or require additional guidance.
Best Regards,
Ankit