What You Can Do with GroupDocs.Redaction for Python via .NET

Hide or Delete Private Text in XLSX Files Using Python

With GroupDocs.Redaction for Python via .NET and Python, you can remove private text from XLSX documents—quick and reliable.

How to Remove Content in Xlsx Files

Use GroupDocs.Redaction for Python via .NET in your Python via .NET app to clear or hide sensitive content fast.

  1. Start a Redactor and load the Xlsx file.
  2. Pick the redaction settings you need.
  3. Set the search text and what should replace it.
  4. Apply redaction and save your file.
import groupdocs.redaction as gr
import groupdocs.redaction.redactions as grr

# How to redact text in a XLSX file

# Choose your redaction preferences
# Set the search and replacement values
repl_opt = grr.ReplacementOptions("[redacted]")
        
redaction = grr.ExactPhraseRedaction("Text to hide", repl_opt)

# Use the Redactor constructor to load your file
with gr.Redactor("input.xslx") as redactor:

    # Apply changes and save the updated XLSX
    result = redactor.apply(redaction)
    redactor.save()
pip install groupdocs-redaction-net
click to copy
copied
More examples Documentation

Extra Redaction Features

GroupDocs.Redaction for Python via .NET makes it easy to hide or delete private info across different file formats. Share only what’s meant to be seen.

Features for redacting text, images, and metadata

Replace Private Text

Find and switch out matching words or patterns. Regex and keyword search supported.

Hide Sensitive Images

Cover parts of your file with overlays. Customize how it looks and what it hides.

Erase Metadata

Remove hidden information like document history, author names, or internal tags.

Redact Using Regex Patterns

Find text patterns like phone numbers, IDs, or emails with regex and remove them fast.

Python

import groupdocs.redaction as gr
import groupdocs.redaction.options as gro
import groupdocs.redaction.redactions as grr

# Set your EMAIL regex pattern and replacement text
repl_opt = grr.ReplacementOptions(color)
emailRegex = "[a-zA-Z0-9._%+-]+@[a-zA-Z0-9.-]+\.[a-zA-Z]{2,}"

redaction = grr.RegexRedaction(emailRegex, repl_opt)

# Open the document you want to clean
with gr.Redactor("source.xslx") as redactor:

    # Apply redaction rules
    result = redactor.apply(redaction)

    # Save your redacted file
    so = gro.SaveOptions()
    so.add_suffix = True
    so.rasterize_to_pdf = False
    result_path = redactor.save(so)
pip install groupdocs-redaction-net
click to copy
copied
More examples Documentation

Meet GroupDocs.Redaction for Python via .NET

GroupDocs.Redaction for Python via .NET gives Python developers everything they need to remove or hide private data in XLSX files—text, images, notes, and more.
Learn more
About illustration

Ready to get started?

Download GroupDocs.Redaction for free or get a trial license for full access!

Useful resources

Explore documentation, code samples, and community support to enhance your experience.

Redact Content in XLSX Using Python

Keep sensitive data private by removing it from XLSX files using Python tools.

Temporary license tips

1
Sign up with your work email.
Free mail services are not allowed.
2
Use Get a temporary license button on the second step.
 English