Explore GroupDocs.Redaction for .NET Features

Cover Sensitive Images in EXCEL Files with Overlays Using .NET

Protect personal and business data in EXCEL files using C#. Get fast and reliable data protection with our tools.

Keep Your Data Safe in Excel Files

GroupDocs.Redaction for .NET helps your .NET apps secure documents by hiding sensitive content.

  1. Create a Redactor instance and provide the Excel file path.
  2. Configure redaction options for desired results.
  3. Select the image area and overlay color.
  4. Apply redaction and save the file.
// Mask image content in EXCEL

// Load document using Redactor
using (Redactor redactor  = new Redactor("input.xslx"))
{
    // Set up overlay size and color
    Size replacement_size = new Size(100, 100);
    var replacement_options = new RegionReplacementOptions(Color.Blue, replacement_size);

    // Select area to hide
    Point replacement_point = new Point(200, 200);
    var redaction = new ImageAreaRedaction(replacement_point, replacement_options);
    
    // Apply and save changes
    redactor.Apply(redaction);
    redactor.Save();
}
dotnet add package GroupDocs.Redaction
click to copy
copied
More examples Documentation

Redact Any Content in Documents

GroupDocs.Redaction for .NET helps you hide or erase sensitive content in various document formats. Protect data while keeping documents easy to use.

Powerful Redaction Options

Search and Edit Text

Find sensitive text and replace it to protect private data in your documents.

Overlay Image Areas

Cover full images or selected parts with overlays to keep visuals private.

Remove Metadata

Erase hidden metadata fields to avoid accidental information leaks.

Mask Image Data with Overlays

This example shows how to cover sensitive information in document images.

C#

//  Open file for editing
using (Redactor redactor  = new Redactor("source.xslx"))
{
    // Define overlay size, color, and placement
    Size replacement_size = new Size(300, 30);
    var replacement_options = new RegionReplacementOptions(Color.Blue, replacement_size);
    Point replacement_point = new Point(20, 125);
    var redaction = new ImageAreaRedaction(replacement_point, replacement_options);

    // Target a specific image section on page one
    redaction.Filters = new RedactionFilter[] {
        new PageRangeFilter(PageSeekOrigin.Begin, 0, 1),
        new PageAreaFilter(new Point(0, 300), new Size(600, 600))
    };

    // Apply overlay to mask the image
    redactor.Apply(redaction);

    // Save the final document
    var save_options = new SaveOptions() { AddSuffix = true, RasterizeToPDF = false };
    var outputPath = redactor.Save(save_options);
}
dotnet add package GroupDocs.Redaction
click to copy
copied
More examples Documentation

About GroupDocs.Redaction for .NET

GroupDocs.Redaction for .NET equips C# developers with tools to hide or delete sensitive content in EXCEL files. Cover text, images, and metadata to keep documents secure.
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.

Protect EXCEL Files with .NET Redaction Tools

Use .NET to hide or delete sensitive information in EXCEL files. A trusted solution for document security.

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