Free Support Forum - aspose.com

How to create Excel file if datatable has 70000 records using aspose.cells


Hi,


I am using Aspose.cells to create excel file from a datatable. Now I got an issue with datatable with 70000 rows. One sheet in Excel can handle only 65536 rows and I tried to add new sheet to the workbook to put rest of rows. I am not sure how to add new worksheet to the workbook and I am not sure how to handle excel sheets with more than 65536 rows.


Thanks,
Srilakshmi

This message was posted using Email2Forum by ShL77.

You saving it as Excel 2003? I understand if you save it as Excel 2007, you can have over million rows.

Add a new workbook.

http://www.aspose.com/demos/.net-components/aspose.cells/vb.net/quick-start/worksheets/managing-worksheets.aspx

'Add a new worksheet to the Workbook object
workbook.Worksheets.Add()
'Obtain the reference of the newly added worksheet by passing its sheet index
worksheet = workbook.Worksheets(1)
'Set the name of the newly added worksheet
worksheet.Name = "My Worksheet2"

Hi,

Yes, your understanding is correct!

If you have over 70k records, you should import data into Excel 2007 Xlsx file format, you can fill a worksheet and save/generate the file in Xlsx file format using the Aspose.Cells APIs.


workbook.Save(“MyFile.xlsx”,FileFormatType.Excel2007Xlsx);


Thank you.