CellColumnRedaction class

CellColumnRedaction class

Represents a text redaction that replaces text in a spreadsheet document (CSV, Excel, etc.).

The CellColumnRedaction type exposes the following members:

Constructors

Constructor Description
init Initializes a new CellColumnRedaction.

Methods

Method Description
apply_to Applies the redaction to a given format instance.
apply_to_document_format_instance

Properties

Property Description
description The description of the redaction, containing its name and parameters.
filter The column and worksheet filter.
pattern The regular expression pattern to match.
action_options The ReplacementOptions instance specifying the type of text replacement. (inherited from TextRedaction)
ocr_connector The IOcrConnector implementation used to extract text from graphic content. (inherited from TextRedaction)

Example

from groupdocs.redaction import Redactor
from groupdocs.redaction.redactions import CellColumnRedaction, ReplacementOptions
from groupdocs.redaction.filters import CellFilter

with Redactor("Sales in September.xlsx") as redactor:
    filter = CellFilter(column_index=1, worksheet_name="Customers")
    regex = r"^\w+([-+.']\w+)*@\w+([-.]\w+)*\.\w+([-.]\w+)*$"
    redactor.apply(CellColumnRedaction(filter, regex, ReplacementOptions("[customer email]")))
    redactor.save()

See Also