You must close streams on the server side. Change your code as follows: FileInputStream is = new FileInputStream(filePath)) XSSFWorkbook workbook = new XSSFWorkbook(is); is.close();
Yegor On Wed, Feb 29, 2012 at 10:04 PM, jiteshks <[email protected]> wrote: > I have tried both these versions :- > > XSSFWorkbook workbook = new XSSFWorkbook(filePath); //deprecated > > and > > XSSFWorkbook workbook = new XSSFWorkbook(new FileInputStream(filePath)); > > Both throw the same error. > > -- > View this message in context: > http://apache-poi.1045710.n5.nabble.com/InvalidOperationException-Can-t-open-specified-file-tp5524067p5525661.html > Sent from the POI - User mailing list archive at Nabble.com. > > --------------------------------------------------------------------- > To unsubscribe, e-mail: [email protected] > For additional commands, e-mail: [email protected] > --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
