Discover Features of GroupDocs.Redaction for Java

Hide Sensitive Images in EXCEL Files with Overlays Using Java

Protect private and business visuals in EXCEL files with Java. Fast and easy tools for reliable data protection.

Secure Your Data in Excel Files

GroupDocs.Redaction for Java helps Java apps hide sensitive content inside documents with ease.

  1. Create a Redactor object and load your Excel file.
  2. Set redaction options to match your needs.
  3. Choose the image area to cover and pick an overlay color.
  4. Apply the redaction and save your document.
// Hide image content in EXCEL

// Open file with Redactor
final Redactor redactor = new Redactor("input.xslx");
try
{
    // Define overlay size and color
    java.awt.Dimension replacement_size = new java.awt.Dimension(100, 100);
    RegionReplacementOptions replacement_options = 
        new RegionReplacementOptions(java.awt.Color.BLUE, replacement_size);

    // Mark area you want to hide
    java.awt.Point replacement_point = new java.awt.Point(200, 200);
    ImageAreaRedaction redaction = 
        new ImageAreaRedaction(replacement_point, replacement_options);

    // Apply changes and save the file
    RedactorChangeLog result = 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

Hide or Delete Content in Documents

GroupDocs.Redaction for Java lets you cover or erase sensitive data in multiple file types. Keep your documents clear and secure.

Advanced Redaction Features

Find and Replace Text

Search documents for private text and replace it to keep data safe.

Cover Image Areas

Hide parts of images or entire visuals with colored overlays.

Clean Metadata

Remove hidden metadata to avoid sharing extra information.

Cover Image Data with Overlays

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

Java

//  Open the file for editing
final Redactor redactor = new Redactor("source.xslx");
try
{
    // Set overlay dimensions, color, and position
    java.awt.Dimension replacement_size = new java.awt.Dimension(300, 30);
    RegionReplacementOptions replacement_options = 
      new RegionReplacementOptions(java.awt.Color.BLUE, replacement_size);
    java.awt.Point replacement_point = new java.awt.Point(20, 125);
    ImageAreaRedaction redaction = new ImageAreaRedaction(replacement_point, replacement_options);

    // Pick the image section on the first page
    redaction.setFilters(new RedactionFilter[] {
        new PageRangeFilter(PageSeekOrigin.Begin, 0, 1),
        new PageAreaFilter(new java.awt.Point(0, 300), new java.awt.Dimension(600, 600))
    });

    // Apply the overlay to hide data
    redactor.apply(redaction);

    // Save your redacted document
    SaveOptions save_options = new SaveOptions();
    save_options.setAddSuffix(true);
    save_options.setRasterizeToPDF(false);
    redactor.save(save_options);
}
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

About GroupDocs.Redaction for Java

GroupDocs.Redaction for Java gives Java developers the tools to hide or delete content in EXCEL files. Cover text, images, and metadata to protect sensitive 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.

Secure EXCEL Files with Java Redaction

Use Java to hide or erase private information in EXCEL files. A simple way to ensure document privacy.

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