https://bz.apache.org/bugzilla/show_bug.cgi?id=59674
Bug ID: 59674
Summary: Workbook.write() corrupts non edited BIFF8 file
Product: POI
Version: 3.13-FINAL
Hardware: PC
Status: NEW
Severity: major
Priority: P2
Component: HSSF
Assignee: [email protected]
Reporter: [email protected]
Using JDK 1.8.0_92
import java.io.File;
import java.io.FileInputStream;
import java.io.FileOutputStream;
import java.io.IOException;
import org.apache.poi.openxml4j.exceptions.InvalidFormatException;
import org.apache.poi.ss.usermodel.Workbook;
import org.apache.poi.ss.usermodel.WorkbookFactory;
public class Main {
public static void main(String[] args) throws IOException,
InvalidFormatException {
try (FileInputStream is = new FileInputStream(args[0]);
Workbook wb = WorkbookFactory.create(is);
FileOutputStream os = new
FileOutputStream(File.createTempFile("test", "excel"))) {
wb.write(os);
}
}
}
Not working XLS https://drive.google.com/open?id=0B3S4vhAbS0W2NHYwZUtwMXI4bkk
Working XLSX https://drive.google.com/open?id=0B3S4vhAbS0W2c19jZGptMjRFaXc
--
You are receiving this mail because:
You are the assignee for the bug.
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]