GridJsWorkbook .ExportToJson cause the OutOfMemoryException

Hi there,
While using the GridJSworkbook to export the Excel to JSON content, the OutOfMemoryExceptionwas thrown out.
The Excel is about 20 MB. But the used memory is more than 3GB.

Below are the codes:
var gridJsWorkbook = new GridJsWorkbook();
using FileStream stream = new FileStream(fileInfo.FullName, FileMode.Open, FileAccess.Read);
gridJsWorkbook.ImportExcelFile(stream, GridLoadFormat.Xlsx);
var excelContent = gridJsWorkbook.ExportToJson();

The StackTrace is below:
System.OutOfMemoryException: Exception of type ‘System.OutOfMemoryException’ was thrown.
at System.String.Concat(String[] values)
at (IEnumerator , CellArea , Boolean , StringBuilder)
at (Workbook , String , String )
at (String )
at Aspose.Cells.GridJs.GridJsWorkbook.ExportToJson()

Assembly Aspose.Cells.GridJs, version: Version=24.1.0
Please help to check. Thank you.

@Andy92366
Could you provide the file
we need to do the detail investigation on the file.

Hi Peter,
Here is the link for the file. SampleFile.
Thank you.

@Andy92366
We have opened the following new ticket(s) in our internal issue tracking system and will deliver their fixes according to the terms mentioned in Free Support Policies.

Issue ID(s): CELLSGRIDJS-1106

You can obtain Paid Support Services if you need support on a priority basis, along with the direct access to our Paid Support management team.

@Andy92366
We now add the GridJsWorkbook.JsonToStream API to write JSON of the file to the stream. It will avoid OutOfMemoryException. We will publish the official v24.7 release which includes this fix soon.

Hi Peter,
Thank you so much for your help. :+1:

@Andy92366
You are welcome. If you have any questions, please feel free to contact us.

The issues you have found earlier (filed as CELLSGRIDJS-1106) have been fixed in this update. This message was posted using Bugs notification tool by johnson.shi