Search code examples
javaexceltestngfilewriter

Write data to a Open excel sheet


I am trying to write data into a excel sheet using JAVA, I am able to achieve it when the excel file is closed.

But, When I try to write data when the file is open, I get java.io.FileNotFoundException .

Is there a way to overcome this? If not, can you please explain me why??


Solution

  • Unfortunatly I believe there is nothing you can do about it as I do not think that Java supports reading files that are already opened by other applications (I am guessing that you are getting "Permission denied" in the exception).