0

I have a use case where use should be able to adjust the column width in a protected Excel sheet generated using apache poi. I tried lockFormatColumns but it did not worked. Is it possible to allow column resize even if the sheet is protected ? I also tried out the answer given in apache-poi-lock-the-cell-but-allow-column-resize but did not worked as expected.

PS: The above actually worked, the issue was I'm using linux and using Libre office, some how it did not work for Libre office but worked fine in Microsoft Office.

Rajith K
  • 399
  • 4
  • 18
  • For me this works. The sheet is protected but formatting columns, including column width, is possible. What Excel version are you using? – Axel Richter Jul 11 '22 at 08:45
  • @AxelRichter I'm using Apache poi version: 5.1.0 – Rajith K Jul 11 '22 at 11:34
  • Me too. But using what **Excel** version does it not work? – Axel Richter Jul 11 '22 at 11:36
  • Oh @AxelRichter I'm actually in linux I'm using Libre Office 7.1.7.2 – Rajith K Jul 11 '22 at 11:38
  • @AxelRichter Seems like it's the case, I tried on Excel online from onedrive it worked !!! Thank you very much, seems like libre office dosen't support this somehow – Rajith K Jul 11 '22 at 13:25
  • 1
    LibreOffice is not able to allow column formatting when sheet is protected. It only can allow to: Select protected cells, Select unprotected cells, Insert columns, Insert rows, Delete columns and Delete rows. See https://help.libreoffice.org/7.3/en-US/text/scalc/01/06060100.html. – Axel Richter Jul 11 '22 at 14:42

0 Answers0