Main Features of GroupDocs.Redaction for Python via .NET

Hide Sensitive Images in XLSX Documents Using Python

Easily protect confidential images in XLSX files with Python. Our tools ensure fast and effective image redaction.

Protect Sensitive Data in Xlsx Files

GroupDocs.Redaction for Python via .NET makes it simple for your Python via .NET apps to secure documents.

  1. Initialize Redactor and load the Xlsx document.
  2. Set up redaction parameters to match your task.
  3. Define which part of the image to cover and choose a color.
  4. Apply redaction and save the final file.
import groupdocs.redaction as gr
import groupdocs.redaction.redactions as grr
import groupdocs.pydrawing as grd

# Hide confidential image sections in XLSX

# Choose overlay size and color
replacement_size = grd.Size(100, 100)
color = grd.Color.from_argb(255, 220, 20, 60)
replacement_options = grr.RegionReplacementOptions(color, replacement_size)

# Mark the redaction area
replacement_point = grd.Point(200, 200)
redaction = grr.ImageAreaRedaction(replacement_point, replacement_options)
        
# Load document with Redactor
with gr.Redactor("input.xslx") as redactor:

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

Redact Content in Documents

With GroupDocs.Redaction for Python via .NET, you can hide or remove sensitive data in many document formats. Keep documents safe and professional-looking.

Efficient Redaction Tools

Search & Replace Text

Easily locate private text and replace or hide it.

Cover Images with Overlays

Hide full images or specific sections to protect sensitive visuals.

Remove Hidden Metadata

Clean metadata from files to avoid sharing private information.

Mask Image Content with Overlays

This guide shows how to hide sensitive image areas in documents using overlays.

Python

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

# Define overlay size, position, and color
replacement_size = grd.Size(300, 30)
color = grd.Color.from_argb(255, 220, 20, 60)
replacement_options = grr.RegionReplacementOptions(color, replacement_size)
replacement_point = grd.Point(20, 125)
redaction = grr.ImageAreaRedaction(replacement_point, replacement_options)

# Select the specific image section
redaction.filters = [
    grr.PageRangeFilter(grr.PageSeekOrigin.BEGIN, 0, 1),
    grr.PageAreaFilter(grd.Point(0, 300), grd.Size(600, 600))
]

# Open the file for redaction
with gr.Redactor("source.xslx") as redactor:

    # Apply overlay to hide the area
    result = redactor.apply(redaction)

    # Save the modified document
    save_options = gro.SaveOptions()
    save_options.add_suffix = True
    save_options.rasterize_to_pdf = False
    result_path = redactor.save(save_options)
pip install groupdocs-redaction-net
click to copy
copied
More examples Documentation

What is GroupDocs.Redaction for Python via .NET?

GroupDocs.Redaction for Python via .NET offers Python developers tools to hide or erase sensitive data from XLSX documents. Redact text, images, and metadata across different formats.
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 Content in XLSX Files with Python

Use Python to redact or remove sensitive data from XLSX files. Ideal for businesses and individuals looking to protect their documents.

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