Please also note:
In versions 7.x, only saving XLS/XLSX was supported by LightCells API. Reading template files in light mode is not supported yet. In old versions before V7, we did support reading template files in light mode. But with those versions in light mode we can only simply provide cell content read from template file to user, all other objects such as ranges, styles, drawings, …etc. are not supported. Because we have made greate changes for our java component from V7, the old model of LightCells for reading template files was not suitable and we remove it from the new version. We will try to re-implement it in later versions to provide more flexible way for users to read template files in light mode, but we are afraid we cannot support it soon because there are some other important tasks we need to complete at first.
Well, the light cells APIs is mainly designed for manipulating cell data one by one without building the complete data model(Cell collection) into memory. It works in a event-driven similar mode. For saving workbook, user provide cell’s content one by one in the saving procedure and cells component saves it into the resultant file directly. For reading template files, cells component parses every cell and provide its value to user one by one. In both procedures one Cell object will be processed and then discarded, the Workbook object does not hold the collection of them, so certain amount of memory will be saved in this mode when importing/exporting excel files that large cells dataset in it costs most of memory. However, what you worry about is also a part of the truth. Because of the different data model and structure of XLS and XLSX files, light cells APIs saves memory more effectively for XLSX files than XLS files.
different data model and structure of XLS and XLSX files, light cells APIs saves
memory more effectively for XLSX files than XLS files.‘
Thanks for your questions.
LightCells actually will free the memory once it is done with processing of cells, it will not keep them holding.
Anyway we have forwarded your questions to development team, it will answer you asap.
LightCells does not load all cells in memory for XLS files. It will process one cell and then discard it, and then to next cell. It is in the same way with doing with XLSX file. However, for XLSX file we can save data directly to the final stream/file.
For XLS, because its different file structure, all substreams of the final file need to be created in memory at first. So, with LightCells API saving XLS file will requires more memory than saving XLSX file. Commonly, using LightCells API to save XLSX file may save 50% or more memory than common way, saving XLS may save about 20-40% memory. For reading template file with LightCells, as we have said, we will support it in later versions but cannot finish it soon, so we cannot give more statistic data of performane for it currently.
I need to generate a XLS-2003 file which may contain more than 65K rows and 400 columns using a simple
XLS template file
Data will be picked up from standard tab seperated data file.
I tried LightCells API. But it is throwing :- java.lang.OutOfMemoryError: Java heap space
Is this not yet supported by Aspose ?
I tried to create a simple XLS file which has 65K rows * 240 columns.
Still it is throwing :- java.lang.OutOfMemoryError: Java heap space
I already worked with this sample provided and run with the below JVM settings