So, I using Apache POI in order to parse an Excel file to my Database. For this I am initializing an XSSFWorkbook
as follows:
XSSFWorkbook workbook = new XSSFWorkbook(fIP);
Then I proceed with my method. workbook.close()
is not available as a method to close the workbook afterwards. Any ideas of how can I let garbage collection take the workbook after the task is finished?
I had this issue, and it was making little sense. In the end I tracked the issue down to my IDE (netbeans) was picking up an earlier version of the POI libraries (v3.8) which didn't have the "close" method. So check your class path and look for duplicate imports of different versions of the POI libraries.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With