My application opens existing workbook or creates a new one if it doesn't exist.
Next it makes some changes in it, writes them to file and closes the workbook.
When workbook is already opened in Excel or OO then I can also open it and make some changes from my Lazarus app. but when I try to write changes I receive an error.
The goal is to detect if workbook is already opened and close it before opening it by my application.
Can you help how to detect it and close, please.