Document Processing SDKs

Annotate Excel Spreadsheets with Java

Add and manage annotations in Microsoft Excel spreadsheets programmatically — no Office installation required.

How to Annotate an Excel Spreadsheet in Java

GroupDocs.Annotation for Java makes it easy to annotate Excel spreadsheets:

  1. Open the Excel file with an Annotator instance.
  2. Create and configure the annotation you need.
  3. Add the annotation to the spreadsheet.
  4. Save the annotated Excel file.
// Annotate an Excel spreadsheet

// Open the spreadsheet with an Annotator instance
Annotator annotator = new Annotator("input.xlsx");
try {
    // Create an area annotation
    AreaAnnotation area = new AreaAnnotation();
    area.setBox(new Rectangle(100, 100, 200, 80));
    area.setBackgroundColor(65535);
    area.setPageNumber(0);
    area.setMessage("Important");

    // Add the annotation
    annotator.add(area);

    // Save the annotated spreadsheet
    annotator.save("annotated.xlsx");
} finally {
    annotator.dispose();
}
implementation 'com.groupdocs:groupdocs-annotation:25.6.0'
click to copy
copied
More examples Documentation

Full Control Over Excel Annotations

Add every annotation type to Excel spreadsheets and manage them with a simple API.

Annotate Excel spreadsheets

Text Markup

Highlight, underline, strike out, or replace text in Excel files.

Shapes & Watermarks

Draw shapes and stamp watermarks or images onto Excel worksheets.

Manage Annotations

Get, remove, import, and export Excel annotations.

Read Excel Annotations

Retrieve the annotations stored in an annotated Excel spreadsheet:

Java

//  Open the annotated spreadsheet
Annotator annotator = new Annotator("annotated.xlsx");
try {
    // Get all annotations
    List<AnnotationBase> annotations = annotator.get();

    // Inspect each annotation
    for (AnnotationBase annotation : annotations) {
        System.out.println(annotation.getMessage());
    }

    // Save the spreadsheet
    annotator.save("output.xlsx");
} finally {
    annotator.dispose();
}
implementation 'com.groupdocs:groupdocs-annotation:25.6.0'
click to copy
copied
More examples Documentation

Annotate Excel Files

GroupDocs.Annotation for Java lets you add, edit, and remove annotations in Microsoft Excel spreadsheets. Highlight cells, draw shapes, stamp watermarks and images, and attach threaded comments — then save the result in the original Excel format.
Learn more
About illustration

Ready to get started?

Download GroupDocs.Annotation for free or get a trial license for full access!

Useful resources

Explore documentation, code samples, and community support to enhance your experience.

Annotate Other File Formats

GroupDocs.Annotation for Java supports annotating documents across many file formats:

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