Hi,

 

when using Workbook.write (org.apache.poi.ss.usermodel.Workbook) in
succession, the result will be a corrupted, non-readable file. Is this for
some reason intended behavior or is this a bug? There seems to be some state
managed on the workbook level when calling Workbook.write:

 

File f = new File("C:/temp/test.xlsx");

 

        Workbook wb = new XSSFWorkbook();

        Sheet s = wb.createSheet("MySheet");

        

        FileOutputStream fos1 = new FileOutputStream(f, false);

        wb.write(fos1);

        fos1.close();

 

        FileOutputStream fos2 = new FileOutputStream(f, false);

        wb.write(fos2);

        fos2.close();

 

If someone could shed some light on this that would be great.

 

Thanks,

Martin

 

Reply via email to