Initially, OutOfMemory errors were encountered, however after increasing the JVM heap size the program that generates the HSSF file appeared to run correctly. However, Excel 2000 cannot open the output file produced. (There's no error message--the document window just flashes up on the screen for a split second before disappearing.) Below is a simple test case that demonstrates the problem: ================================================================================ import java.io.File; import java.io.FileOutputStream; import java.io.IOException; import java.io.OutputStream; import org.apache.poi.hssf.usermodel.HSSFCell; import org.apache.poi.hssf.usermodel.HSSFRow; import org.apache.poi.hssf.usermodel.HSSFSheet; import org.apache.poi.hssf.usermodel.HSSFWorkbook; public final class HssfTest { public static final void main(final String[] args) throws IOException { final HSSFWorkbook wb = new HSSFWorkbook(); final HSSFSheet sheet = wb.createSheet(); for (int i = 0; i < 30000; i++) { final HSSFRow row = sheet.createRow(i); final HSSFCell cell = row.createCell((short) 0); cell.setCellValue(Integer.toString(i)); } final OutputStream out = new FileOutputStream(new File ("C:\\test.xls")); try { wb.write(out); } finally { out.close(); } } }
Created attachment 8469 [details] Test case (test runs without errors, but Excel 2000 cannot open output document)
*** This bug has been marked as a duplicate of 15375 ***