wb <- wb_workbook()
wb$add_worksheet("S1")
wb$add_data_table(1, x = iris[1:30, ])
# Formatting cells / columns is allowed , but inserting / deleting columns is protected:
wb$protect_worksheet("S1",
protect = TRUE,
properties = c("formatCells", "formatColumns", "insertColumns", "deleteColumns")
)
# Remove the protection
wb$protect_worksheet("S1", protect = FALSE)
Run the code above in your browser using DataLab