Main Features of GroupDocs.Redaction for Java

Hide Data in XLSX with Overlays Using Java

Use Java and GroupDocs.Redaction for Java to mask private content in XLSX files without affecting format.

Protect Info in Xlsx Documents

Keep your documents safe using simple code with GroupDocs.Redaction for Java in Java.

  1. Create a Redactor with the file path.
  2. Set up your redaction logic.
  3. Choose the keyword and overlay color.
  4. Redact and save the file.
// Hide info in XLSX using blocks

// Load the file with Redactor
final Redactor redactor = new Redactor("input.xslx");
try
{
    // Set up redaction preferences
    // Add text and color to block
    ReplacementOptions opt = new ReplacementOptions(java.awt.Color.RED);
    
    ExactPhraseRedaction redaction = new ExactPhraseRedaction("Text to hide", opt);

    // Save the updated document
    redactor.apply(redaction);
    redactor.save();
}
finally { redactor.close(); }
<dependencies> <dependency> <groupId>com.groupdocs</groupId> <artifactId>groupdocs-redaction</artifactId> <version>24.6</version> </dependency> </dependencies> <repositories> <repository> <id>repository.groupdocs.com</id> <name>GroupDocs Repository</name> <url>https://repository.groupdocs.com/repo/</url> </repository> </repositories>
click to copy
copied
More examples Documentation

Built-In Privacy Features

Use GroupDocs.Redaction for Java to block or delete content in your files while keeping structure untouched.

Easy privacy tools

Change or hide text

Edit or redact specific words easily.

Mask image parts

Add overlays to hide photos or graphic details.

Remove hidden info

Wipe metadata like user info or file history.

Use Regex to Redact Content

Automatically find and hide text with pattern matching

Java

//  Open the spreadsheet
final Redactor redactor = new Redactor("source.xslx");
try
{
    // Define pattern and overlay color
    ReplacementOptions repl_opt = new ReplacementOptions(java.awt.Color.BLUE);
    RegexRedaction redaction = new RegexRedaction("\\d{2}\\s*\\d{2}[^\\d]*\\d{6}", repl_opt);
    
    // Apply redaction rules
    redactor.apply(redaction);

    // Export your result
    SaveOptions saveOptions = new SaveOptions();
    saveOptions.setAddSuffix(true);
    saveOptions.setRasterizeToPDF(false);
    redactor.save(saveOptions);
}
finally { redactor.close(); }
<dependencies> <dependency> <groupId>com.groupdocs</groupId> <artifactId>groupdocs-redaction</artifactId> <version>24.6</version> </dependency> </dependencies> <repositories> <repository> <id>repository.groupdocs.com</id> <name>GroupDocs Repository</name> <url>https://repository.groupdocs.com/repo/</url> </repository> </repositories>
click to copy
copied
More examples Documentation

Why GroupDocs.Redaction for Java Works

GroupDocs.Redaction for Java lets Java developers secure XLSX files. Hide text, pictures, or metadata quickly.
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.

Redact XLSX Data Using Java

Use overlays or delete content in XLSX files to keep sensitive data private with Java.

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