Hi
I use Delphi with Hojacalc to connect to my spreadcheet
But when the spreadsheet is Open I receive an error message when I send HojaCalc.saveDoc
How I can detected if the spreadsheet is allready open in another program
Thanks
[Solved] Detect open spreadsheet
[Solved] Detect open spreadsheet
Last edited by Bingo on Thu Jun 17, 2021 11:44 am, edited 1 time in total.
OpenOffice 4.1 on Windows 10
Re: Detect open spreadsheet
https://www.openoffice.org/api/docs/com ... oader.html returns the document specified by its URL and loads it if required.
Please, edit this topic's initial post and add "[Solved]" to the subject line if your problem has been solved.
Ubuntu 18.04 with LibreOffice 6.0, latest OpenOffice and LibreOffice
Ubuntu 18.04 with LibreOffice 6.0, latest OpenOffice and LibreOffice
Re: Detect open spreadsheet
Hi
I am using the loadComponentFromURL function to open the spreadsheet and it works
My problem is not when I load the spreadsheet, if the worksheet is open (with OOCalc) the document can open it. But when I want to update the worksheet an I/O error occurs due to locking by OOCalc
I want to check if the spreadsheet is locked when I open it and open a message dialog to inform the user. Exception sends a generic IO error message (the same as when the file exists not)
Thankyou
I am using the loadComponentFromURL function to open the spreadsheet and it works
My problem is not when I load the spreadsheet, if the worksheet is open (with OOCalc) the document can open it. But when I want to update the worksheet an I/O error occurs due to locking by OOCalc
I want to check if the spreadsheet is locked when I open it and open a message dialog to inform the user. Exception sends a generic IO error message (the same as when the file exists not)
Thankyou
OpenOffice 4.1 on Windows 10
Re: Detect open spreadsheet
No idea other than catching the IO error.
Please, edit this topic's initial post and add "[Solved]" to the subject line if your problem has been solved.
Ubuntu 18.04 with LibreOffice 6.0, latest OpenOffice and LibreOffice
Ubuntu 18.04 with LibreOffice 6.0, latest OpenOffice and LibreOffice
Re: Detect open spreadsheet
Hi
I solved my problem by checking, in the directory, if the file with the name ".~lock.filename,ods#" exists
This file is created by openoffice when it opens the file (not if readonly)
Thank
I solved my problem by checking, in the directory, if the file with the name ".~lock.filename,ods#" exists
This file is created by openoffice when it opens the file (not if readonly)
Thank
OpenOffice 4.1 on Windows 10