SASivaneswaran Amsu Syncfusion Team May 24, 2019 08:45 AM
Thank you for contacting Syncfusion support.
We have maintained the data in both list and dictionary collection internally to improve the performance which lead the higher memory consumption. We recommend you to set the following property as FALSE to avoid out of memory exception.
(workbook as WorkbookImpl).InnerSST.UseHashForSearching = false;
If you are still facing issue with above suggestion, then we request you to use the import on save functionality to import large data with less memory consumption.
worksheet.ImportDataTable(dataTable, 1, 1, true);
Please refer the following UG documentation link to know more about the ImportOnSave.
AVAbirami Varadharajan Syncfusion Team May 30, 2019 08:12 AM
We are able to reproduce the out of memory exception issue in 32bit project due to import of large data (575356 rows and 53 columns). So, we request you to use 64bit project to import large data and save it as Excel file without any exception. We have prepared a sample in 64bit and shared for your reference which can be downloaded from the following link.
The data is imported from column O instead of A because, UseHashForSearchingproperty is set as FALSE. This property should not be set as FALSE when importing data table with importonsave option. So, we request you to remove that line to resolve the issue.
Kindly try this and let us know if this resolve the issue.
PMPaul MeemsMay 31, 2019 06:28 AM
Thanks for the sample. Changing to 64Bit did the trick.
I was building for 'Any CPU' but Visual Studio also ticked 'Prefer 32Bit', which I didn't realize.
Unticking it solved my memory problem.
I also want to add my headers as well.
I thought to be smart and use the 'normal' ImportDataTable() for the first row and use the optimized ImportDataTable() for the remaining rows.
But when using the ImportDataTable with importOnSave all other data seems to be cleared.
The first two rows in the sheet are skipped and the first row from the datatable is skipped as well.
But when I want to combine these two, I always end up with the first two rows empty.
And it doesn't matter if I call ImportDataTable(.., true, 1, 1, true) before or after ImportDataTable(.., 3, 1, true)
Please assist one more time and explain to me how to get the headers in my file.
AVAbirami Varadharajan Syncfusion Team June 3, 2019 04:50 AM
While importing datatable with importOnSave option, the values in the existing cells are cleared for performance concerns and the values only in the datatable are set to cells while saving the workbook. We don’t have support for Accepting both importOnSave and isFieldNameShown options on importing data table. However, we will consider this enhancement and include this support in our release version 17.2 SP – 1 which will be available by July 2019.
You can track the status of this enhancement from the following link.
is working fine with my large datatable after compiling for x64.
AVAbirami Varadharajan Syncfusion Team June 4, 2019 12:54 AM
Thank you for updating us.
We will update you once the enhancement is implemented.
AVAbirami Varadharajan Syncfusion Team September 23, 2019 01:01 AM
We are glad to announce that our Essential Studio 2019 Volume 3 Beta Release version 188.8.131.52 is rolled out with the feature “ImportOnSave option should import column headers” and it is available for download under the following link.