I'm using ooolib v.24 and oo v.3.1 in Ubuntu.
I'm trying to modify a file with ooolib, having the file open in openoffice. I then click "refresh" in openoffice to get the updates.
The script generates strange results in the spreadsheet (randomly duplicated info). This seems to occur when the .~lock is still present. Removing it before editing the ods fixes the problem.
May I suggest that you generate a .lock while opening a file and remove it uppon closing?
Hope it helps..!