Hi,
In my project, There is a requirement of writing ~1000 columns and ~5000 rows of data from datatable to excel sheet, using C#.
When I convert all data from datatable to Object Array, and then try to load the Object array data to the excel sheet using below code :
int rows = Output_DT.Rows.Count;
int columns = Output_DT.Columns.Count;
var startCell = (Excel.Range)oSheet.Cells[1, 1];
var endCell = oSheet.Cells[rows + 1, columns];
var writeRange = oSheet.Range[startCell, endCell];
writeRange.Value2 = arr;
I am receiving an exception message as
"Insufficient memory to continue the execution of the program.".
Kindly help me how to resolve this issue as I need to deliver my project , having above said requirements to my client .
Appreciate your help!!
Thanks in Advance.