poi-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From liaobert <ml...@accendgroup.com>
Subject Deleting Excel file after reading it into a XSSFWorkbook
Date Thu, 03 May 2012 21:05:22 GMT
I'm currently reading in an excel file to create a new XSSFWorkbook. When I'm
done, I want to close the workbook and delete that excel file, but it's not
working. Here's what I have:

File vifList = new File("viflist.xlsx");
FileInputStream vifStream = new FileInputStream(vifList.getName());
XSSFWorkbook wb = new XSSFWorkbook(vifStream);

//process stuff


vifList.delete() fails. What do I need to do in order to delete this file?

View this message in context: http://apache-poi.1045710.n5.nabble.com/Deleting-Excel-file-after-reading-it-into-a-XSSFWorkbook-tp5684292.html
Sent from the POI - Dev mailing list archive at Nabble.com.

To unsubscribe, e-mail: dev-unsubscribe@poi.apache.org
For additional commands, e-mail: dev-help@poi.apache.org

View raw message