Noticed a bit of strange behavior while reading a 2007 .xlsx Excel file.  My 
code is heavily based on the XLSX2CSV example code.  Using 3.7 beta 1.

Within that example code the Excel file to be read is opened as an OPCPackage 
in read only mode.  Later in my code I need to delete the original file and 
copy something else to it's path/name.  For some reason java is unable to 
delete that file... presumably because something still has it open.

After playing around for a while and making sure all input/output streams and 
buffers have been closed gracefully and the package object is also closed 
gracefully, I decided to use the .revert() method of the OPCPackage class in 
addition to the close() method.

This works and frees up that file object for deletion.

Question being:  Am I somehow treating this object incorrectly or is this a bug 
that I should file?

Thanks!

Reply via email to