poi-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From bugzi...@apache.org
Subject [Bug 61987] Updating excel file opended with OPCPackage throws: OpenXML4JRuntimeException: Rule M2.4 exception
Date Wed, 10 Jan 2018 17:38:20 GMT
https://bz.apache.org/bugzilla/show_bug.cgi?id=61987

--- Comment #2 from Alain Fagot Bearez <Alain.Bearez@cua.li> ---
Take care about the order you are closing the resources:


            FileOutputStream outputStream = new
FileOutputStream("JavaBooks.xlsx");
            workbook.write(outputStream);
            outputStream.close();
            workbook.close();

            //inputStream.close();
            pkg.close();


Otherwise you are trying to write into a package (document) that has been
closed.

This is a classical duplicate of
https://bz.apache.org/bugzilla/show_bug.cgi?id=60102

-- 
You are receiving this mail because:
You are the assignee for the bug.
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@poi.apache.org
For additional commands, e-mail: dev-help@poi.apache.org


Mime
View raw message