What You Can Do with GroupDocs.Redaction for .NET

Edit or Hide Sensitive Text in XLSX Documents with .NET

With GroupDocs.Redaction for .NET and C#, you can remove personal or business info from your XLSX files and keep them safe to share.

How to Redact Text in Xlsx Files

Use GroupDocs.Redaction for .NET inside your .NET project to hide or delete sensitive info in just a few steps.

  1. Create a Redactor and load the Xlsx file.
  2. Pick the redaction settings that fit your needs.
  3. Enter the text to find and what to replace it with.
  4. Run the redaction process and save your updated file.
// Redacting text from a XLSX file

// Use Redactor to open the file
using (Redactor redactor  = new Redactor("input.xslx"))
{
    // Choose your redaction options
    // Set the search and replacement text
    var repl_opt = new ReplacementOptions("[redacted]");
    
    var redaction = new ExactPhraseRedaction("Text to hide", repl_opt);

    // Apply redactions and save the cleaned file
    redactor.Apply(redaction);
    redactor.Save();
}
dotnet add package GroupDocs.Redaction
click to copy
copied
More examples Documentation

More Tools for Redacting

GroupDocs.Redaction for .NET helps clean different types of content—text, images, or metadata—so your files are ready to share safely.

Redaction options shown

Replace sensitive text

Search through the file and replace anything confidential. Supports simple text and patterns.

Cover image areas

Use overlays to hide visual data. Pick the color, area size, and page layout.

Remove extra data

Delete metadata like author names, timestamps, or internal notes to avoid leaks.

Redact with Regex Rules

Use regex to find and clean up patterns like phone numbers, emails, or other personal details.

C#

//  Open the file to begin
using (Redactor redactor  = new Redactor("source.xslx"))
{
    // Write an EMAIL regex rule and pick a replacement
    var repl_opt = new ReplacementOptions("[redacted]");
    string emailRegex = @"[a-zA-Z0-9._%+-]+@[a-zA-Z0-9.-]+\.[a-zA-Z]{2,}";

    var redaction = new RegexRedaction(emailRegex, repl_opt);

    // Run the redaction based on your pattern
    redactor.Apply(redaction);

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

What is GroupDocs.Redaction for .NET?

GroupDocs.Redaction for .NET lets C# developers search and remove sensitive info from XLSX files. It works with text, pictures, notes, and file data.
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 Info in XLSX with .NET

Clean your XLSX documents by removing personal or sensitive text using .NET tools. Keep your data private.

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