https://issues.apache.org/bugzilla/show_bug.cgi?id=56745
Bug ID: 56745 Summary: POIXMLException raised if workbook opened with XSSFWorkbook(String) constructor Product: POI Version: 3.10 Hardware: PC Status: NEW Severity: normal Priority: P2 Component: XSSF Assignee: dev@poi.apache.org Reporter: icear...@gmail.com I am getting the following exception when trying to write my workbook out to a file: org.apache.poi.POIXMLException: java.io.IOException: Can't obtain the input stream from /docProps/app.xml Here's the code to reproduce the problem (my best translation from Jython to Java) // open workbook String filename = "C:\\path\\to\\file.xlsx"; File file = new File(filename); Workbook wb = new XSSFWorkbook(filename); // save the workbook to disk FileOutputStream out = new FileOutputStream(file); wb.write(out); out.close(); The error occurs while writing the file (wb.write(out)). Additionally, after XSSFWorkbook(filename) has run, if I try to rename the file in Windows Explorer, I get a "File In Use: The application can't be completed because the file is open in Java(TM) Platform SE binary". I'm not sure if this is a related problem. The following code does not have this problem: // open workbook FileInputStream in = new FileInputStream(file); wb = WorkbookFactory.create(file); in.close(); // save the workbook to disk FileOutputStream out = new FileOutputStream(file); wb.write(out); out.close(); Related: bug #56537. Does the fix for 56537 also fix this bug? -- You are receiving this mail because: You are the assignee for the bug. --------------------------------------------------------------------- To unsubscribe, e-mail: dev-unsubscr...@poi.apache.org For additional commands, e-mail: dev-h...@poi.apache.org