I got this error in a windows error box when trying to open .ods spreadsheets. .doc files opened ok.
Found several other threads but with no answer that positively worked.
Eventually, after an hour of trying different things I remembered that I had turned on Windows security - Ransomware Protection. So I turned it off. Close OneDrive and turn off “Controlled folder access”
Problem solved.
Although what you do if you want Ransomeware to work and use Open Office I do not know.
So now everyone is wondering if I am a ransomware hacker trying to get the protection turned off … I am not. turn your internet off while you try this if you are worried
I think the problem is that as Windows tried to copy files to ONEDrive they get tangled and locked.
Strangely I got the same error temporarily when trying to open a browser, that went away on its’ own.