What You Get with GroupDocs.Redaction for Python via .NET

Hide Text in XLSX Files Using Python Overlays

Protect sensitive text in your XLSX files with GroupDocs.Redaction for Python via .NET and Python by placing simple overlays.

Protect Data in Xlsx Files

GroupDocs.Redaction for Python via .NET lets Python via .NET developers hide private info with just a few lines of code.

  1. Start by creating a Redactor and load your Xlsx file.
  2. Set the redaction options that work for your case.
  3. Add the text pattern you want to hide and choose a color.
  4. Run redaction and save your file.
import groupdocs.redaction as gr
import groupdocs.redaction.redactions as grr
import groupdocs.pydrawing as grd

# Hide private content in XLSX with overlays

# Set redaction preferences
# Choose text to cover and overlay color
color = grd.Color.from_argb(255, 220, 20, 60)
repl_opt = grr.ReplacementOptions(color)
        
redaction = grr.ExactPhraseRedaction("Text to hide", repl_opt)

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

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

Helpful Redaction Tools

GroupDocs.Redaction for Python via .NET lets you hide or remove content from many file types. Keep personal or business info protected.

Easy-to-use redaction options

Find and Edit Text

Search for specific text and replace or hide it.

Cover Image Content

Draw overlays over pictures to block out private areas.

Remove Metadata

Clean up background info before sharing your files.

Hide Text Using Regex Patterns

This example shows how to find and hide content using regular expressions.

Python

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

# Set your text pattern and overlay color
color = grd.Color.from_argb(255, 220, 20, 60)
repl_opt = grr.ReplacementOptions(color)

redaction = grr.RegexRedaction("\\d{2}\\s*\\d{2}[^\\d]*\\d{6}", repl_opt)

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

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

    # Save the redacted version
    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

What GroupDocs.Redaction for Python via .NET Can Do

GroupDocs.Redaction for Python via .NET gives Python developers the tools to hide or delete text, images, and more in XLSX files.
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.

Hide Data in XLSX with Python

Use Python tools to hide or remove sensitive parts of your XLSX files quickly and easily.

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