Search code examples
javaexcelfileapache-poishared

XSSFWorkbook shared use of an EXCEL File


I have a Problem with shared access of an EXCEL File append by a JAVA Program. All works fine until the file is not accessed by other and still open, while the program runs again - at least every 10 minutes.

The API tell me something like the file is use and cannot open for writing. Normally a good idea, but exist a way to get arround this behavior? What means in fact: a switch, a value or something special to ignore this?


Solution

  • Unfortunately I don't think you can simply ignore this. If you're not changing file, maybe you can just make a copy of it or catch an exception and try again one minute later?