Hello,
I
want to export more than 100,000 rows into excel document using JAVA As
pose API.Can u suggest me how to work it out.Do u have any pseudo -code
??
Regards
Sridhar Mangipudi
Hi,
From version <?xml:namespace prefix = st1 ns = "urn:schemas-microsoft-com:office:smarttags" />1.9.2, we have removed the 65K row limit for Excel 2007, following code as example:
Workbook wb = new Workbook();
Cells cells = wb.getWorksheets().getSheet(0).getCells();
for(int i=0; i<200000; i++)
{
if(i%100 == 0)
{
System.out.println(i);
}
cells.getCell(i, i%10).setValue("cell"+i+"-"+(i%10));
}
wb.save("t.xlsx", FileFormatType.EXCEL2007);
Thanks for ur reply … But my client is still with older Excel… How do I handle that …??
Hi,
Following are a few preferences.
- Your client needs to upgrade to the lastest version of Aspose.Cells for java and MS Excel 2007.
- Alternatively If you want to stick with the older Aspose.Cells for java version, you should extract data part wise i.e., get data into different worksheets i.e. Sheet1 ---> 1 to 65,000 records. Sheet2 ---> 65,001 to 100,000 records and so on. Mind you! MS Excel 97 - MS Excel 2003 only support to have 65536 rows in a worksheet.
Thank you.
Thanks for ur suggestion…