fromgroupdocs.redactionimportRedactorfromgroupdocs.redaction.redactionsimportCellColumnRedaction,ReplacementOptionsfromgroupdocs.redaction.redactionsimportCellFilter# Define a filter for column 2 in the first worksheetcell_filter=CellFilter()cell_filter.column_index=2cell_filter.work_sheet_name="Sheet1"# Create a redaction that replaces matches of the regex with a placeholderredaction=CellColumnRedaction(cell_filter,r"\bsecret\b",ReplacementOptions("[REDACTED]"))withRedactor("spreadsheet.xlsx")asredactor:redactor.apply(redaction)redactor.save()