__init__ constructor

On this page

init

Initializes a new CellColumnRedaction.

def __init__(self, filter, reg_ex, options):
    ...
Parameter Type Description
filter CellFilter Column and worksheet filter.
reg_ex System.Text.RegularExpressions.Regex Regular expression to search and replace.
options ReplacementOptions Replacement options.

Example

from groupdocs.redaction import Redactor
from groupdocs.redaction.redactions import CellColumnRedaction, ReplacementOptions
from groupdocs.pydrawing import Color

with Redactor("spreadsheet.xlsx") as redactor:
    redactor.apply(
        CellColumnRedaction(
            CellFilter(worksheet="Sheet1", column=2),
            r"\bsecret\b",
            ReplacementOptions(Color.BLACK)
        )
    )
    redactor.save()

See Also

On this page