I have a desktop application developed in Java. This application write data in a .csv.
In my application, I have the possibility to access to the history. If someone have opened the history, the application could not write in it.
My problem is that I do not know how to check if the history is opened or not in my application. I am thinking in different options which will solve my problem and I have these ones:
-Develop an xlsm file which copy data from the history and reference to it in my button.
-Access to history in read-only mode (that will be the better option, but I do not know how to do this)
-Disable the button and not offer this option.
Runtime.getRuntime().exec("cmd /c start P:\\\"directory\\\\projects\\\\2019\\\\GesPlanCam\\\\Results" + LocalDate.now().getMonthValue() + "-" + LocalDate.now().getYear() + ".csv");
As you can see, I access to the file with my cmd and I do an monthly history.
I thaught the better option was to put an argument in my line to open it in read-only mode, but I did not find anything in sources.
Actually, I think the best option to implement is to develop the xlsm file I said before because I do not find any information about how to develop the other ideas, but I know that xlsm file is not efficent and I want to avoid this solution.