Hi,
when we try to import directly from datareader over 1,048,576 rows to xlsx (excel) file the data are cut to 1,048,576 - maximum row limit for excel sheet.
Workbook wbook = new Workbook();
Worksheet sheet = wbook.Worksheets[0];
sheet.Cells.ImportDataReader(dr, true, 0, 0, false,“yyyy-MM-dd”,false);
sheet.AutoFitColumns();
Is any method to split data into more than one sheet during import from datareader (not from datatable)? In this case excel is not going to cut data to 1,048,576 rows.
Thanks for help.
Hi,
It is impossible to load first this data into datatable, becouse it is web application working on IIS and with this amount of data we have out of memory exception (especially if many users are working). For us the best solution would be if aspose software during direct import from datareader were able to automatically split data into few worksheets (if amout of data is greater than 1048576 rows). Is possible in the future Aspose prepare this kind of fix?
Hi,
Well, you may try to convert the DataReader object to fill a DataTable, see the document for your reference:
And even if you use ImportDataReader() method to import it to fill the worksheet in an Asp.NET web application, it would also demand certain amount of memory as you are importing huge list of data into the worksheet.
Regarding your requirement to support splitting data in ImportDataReader() method, we need to discuss this with relevant developers to check its feasibility if we can support it in future versions. Once we have done it and if it is feasible enough, we will log a ticket for it.
We will get back to you soon.
Thank you.
Hi,
We have evaluated your requested feature. I am afraid, we may not implement it in the product. So, you have to simply implement it by yourself (you may also devise the approach mentioned in the above posts). You should write your query to get the count of the data and then split the data using .NET APIs by yourself with that count etc.
Thank you.