Hi,
Workbook workbook = new Workbook();
Worksheets worksheets = workbook.getWorksheets();
for(int i = worksheets.size() - 1; i > 0; --i) {
worksheets.removeSheet(i);
}
Worksheet sheet = worksheets.getSheet(0);
sheet.setName("Sheet1");
Cells cells = sheet.getCells();
for(int i=0; i<treeDAR.getRowCount(); i++) {
for(int c=0; c < treeDAR.getColumnCount(); c++) {
cells.getCell(i, c).setValue(String.valueOf(treeDAR.getValueAt(i, c)));
}
}
JOptionPane.showMessageDialog(this,"1/4 Done");
System.gc();
JOptionPane.showMessageDialog(this,"1/2 Done");
workbook.save("D:/AlphabeticalList.xls");
JOptionPane.showMessageDialog(this,"Done");
////////////////////////////
i am using the above code for exporting to excel.
upto 3000 rows x 120 cols its working fine, but when i try to export 4000 rows X 120 cols its giving "out of memory" error.
- regards,
Venkatasamy
This message was posted using Aspose.Live 2 Forum