I have several xlsx files that have the "read-only recommended" flag set.
- Is there a POI 5.x method available to disable this checkbox?
I looked through POI XML Properties with no luck.
I have several xlsx files that have the "read-only recommended" flag set.
I looked through POI XML Properties with no luck.
Copyright © 2021 Jogjafile Inc.

In
Office Open XML-Excel files the setting "read only recommended" is stored in/xl/workbook.xmlas an attribute in afileSharingXML-element.This can be set or unset using
apache poionly using the low levelorg.openxmlformats.schemas.spreadsheetml.x2006.main.*-classes.Complete example:
If the
sourceFile.xlsxhas set that option, but without passwords, then after running that code theresultFile.xlsxhas not set that option anymore.If passwords are set too, then decryption is needed at first and the password in
fileSharingneeds to be unset too. Of course then at least the decryption-password needs to be known.