We're sorry Aspose doesn't work properply without JavaScript enabled.

Free Support Forum - aspose.com

ImportDataTable throws "Row index is out of range"

I’m using Aspose 4.1. I’m trying to make this call:

sheet.Cells.ImportDataTable(dt, true, 0, 0, 65536, 256, true, “m/d/yy”, true);
where “dt” is a DataTable with 65536 rows. The fifth parameter, rowNumber, according to the documentation is the "Number of rows to be imported, no more than 65536."

When I call it, it throws the exception, “Row index is out of range”. If I lower the value to 65535, same error. If I lower the value to 65534, same error. If I lower the value to 100, it works.

So, somewhere between 100 and 65534, it stops working. What is going on?

FYI, 65333 works. But I want the max: 65336! Does this call have a known bug in it?

Hi,<?xml:namespace prefix = o ns = "urn:schemas-microsoft-com:office:office" />

Thank you for considering Aspose.

Well, I have tested your issue and I am able to execute the following function fine with the latest fix of Aspose.Cells,

sheet.Cells.ImportDataTable(dataTable, true, 0, 0, 65535, 255, true, "m/d/yy", true);

Please try the attached latest version of Aspose.Cells, if you still face any problem, please share your template file and we will check it soon.

Thank You & Best Regards,