Applies a sensitivity label to an Excel file using openxlsx2
and built-in XML. Supported labels are 'Personal', 'OFFICIAL', and
'OFFICIAL_SENSITIVE_VMO' (visual markings only).
The function loads the Excel file, applies the specified sensitivity label
using the appropriate XML, and saves the modified file. If successful, it
silently returns the file path.
Usage
apply_sensitivity_label(file, label)
Arguments
- file
Path to the Excel file (.xlsx or .xls)
- label
Sensitivity label. One of: 'Personal', 'OFFICIAL',
'OFFICIAL_SENSITIVE_VMO'.
Value
Silently returns the file path if successful.
Examples
if (FALSE) { # \dontrun{
# Apply a sensitivity label to an Excel file
# Returns the file path invisibly if successful
apply_sensitivity_label("myfile.xlsx", "Personal")
} # }