Key Features of GroupDocs.Redaction for .NET

Find and Remove Sensitive Text in EXCEL Files with .NET

Use C# and GroupDocs.Redaction for .NET to protect your personal or work files. Your private info stays hidden.

How to Redact Excel Files

With GroupDocs.Redaction for .NET, it’s easy to find and replace private content in .NET apps.

  1. Create a Redactor and open your Excel file.
  2. Choose your redaction settings.
  3. Tell it what to search and what text to use as a replacement.
  4. Start the redaction and save your updated file.
// Steps to redact content in a EXCEL document

// Open the file with Redactor
using (Redactor redactor  = new Redactor("input.xslx"))
{
    // Adjust your redaction settings
    // Pick what to search for and what to replace it with
    var repl_opt = new ReplacementOptions("[redacted]");
    
    var redaction = new ExactPhraseRedaction("Text to hide", repl_opt);

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

More Redaction Tools

GroupDocs.Redaction for .NET gives you powerful ways to hide or erase private info across many file types. Great for sharing safely.

Available redaction tools and settings

Swap out private text

Search and replace exact matches with smart text options, including regex support.

Hide private images

Cover up full images or just parts of a page. You can adjust overlay color and size.

Erase hidden metadata

Remove info like author names, edit history, and comments to protect your identity.

Use Regex for Smarter Redactions

Find and remove data patterns like emails or IDs with regular expressions.

C#

//  Open the file you want to clean
using (Redactor redactor  = new Redactor("source.xslx"))
{
    // Set an EMAIL regex pattern and choose the replacement text
    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 process
    redactor.Apply(redaction);

    // Save your final, 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 gives C# users the tools to clean EXCEL documents. Redact text, images, notes, and background 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.

How to Redact EXCEL with .NET

Use .NET to clean EXCEL files. Keep your content private and secure from leaks.

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