'How to lock specific columns using protectWorksheet in openxlsx package in r

R useRs, How can I protect col1 through col5 from editing/formatting? The current arguments (e.g., 'lockFormattingCells', 'lockFormattingColumns') have only TRUE or FALSE options. I need to protect certain columns before writing the worksheet. Thanks.



Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source