write error - the file could not be written

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.

You can allow LibreOffice access while keeping Ransomware Protection enabled.

Go to Settings > Update & Security > Windows Security > Virus & Threat Protection > Ransomware Protection and click on Manage ransomware protection. You will need to turn on Controlled Folder Access then you will see an option Allow an app through controlled folder access and follow prompts to add C:\Program Files\LibreOffice\program\soffice.bin to allowed apps.

More at Microsoft

Answer is understood and agree.

But why do I have to do that, and why only OpenOffice files.

Ransomware protection as I understand it is just copying files to OneDrive.

The problem does not arise with Google MyDrive.

Even more important why do I and many others have to spend hours trying to find the answer to an obvious screw-up by two tech companies., mostly Microsoft still trying to sell Excel.

Any program that isn’t certified by Microsoft needs to be allowed access to protected folders by the user. This likely to include future versions of existing programs like gimp, inkscape, blender, etc

Protected folders include Documents (formerly my documents), and others that are likely to contain user information.

It isn’t a cock up, it’s a security response to ransom ware. The only cock up is the lack of information given by MS when it was introduced. Note that Apple has introduced something similar requiring user to grant full disc access to programs.

Once Ransomware protection is turned on a lot of options become available, one of which is to set up OneDrive as a backup. There is some ransomware that targets cloud storage so it remains to be seen if OneDrive is vulnerable or not.

To be honest while there is so much that can go wrong with “Ransomeware Protection” (I read in part of it that if a file is deleted in one place it is deleted in all instances), it is more of a nuisance than the hackers themselves.

It seems true that anything new from Microsoft cannot be trusted, mostly because Windows has become too complex for them to make user friendly.

Roll on the Chinese simplified o/s for PCs.