---
Product: Aspose.Cells
Platform: java
Page Type: reference
Canonical URL: https://reference.aspose.org/cells/java/CommentCollection
---

# CommentCollection

## Overview

`CommentCollection` is a class in Aspose.Cells FOSS for Java.

Collection of cell comments on a worksheet.

This class provides 4 methods for working with CommentCollection objects in Java programs.
Available methods include: `add`, `get`, `getCount`, `removeAt`.
All exported members are accessible to any Java application after installing the Aspose.Cells FOSS for Java package.
Properties: `count`.

## Description

`CommentCollection` is a class in the Aspose.Cells FOSS library for Java that exposes 7 methods and 1 property for programmatic use.

Core capabilities include: Removes the comment at the given cell reference (no-op if none). These operations enable developers to integrate commentcollection functionality directly into Java applications.

The class also provides the `count` property (gets the count).

## Properties

| Name | Type | Access | Description |
|------|------|--------|-------------|
| `count` | `int` | Read | Gets the count. |

## Methods

| Signature | Description |
|-----------|-------------|
| `getCount()` → `int` | Returns the count. |
| `get(index: int)` → `Comment` | Returns the comment at the given A1-style cell name, or null if none. |
| `get(cellName: String)` → `Comment` | Returns the comment at the given A1-style cell name, or null if none. |
| `add(row: int, column: int)` → `Comment` | Adds a comment at the given zero-based row/column. |
| `add(cellName: String)` → `Comment` | Adds a comment at the given A1-style cell reference. |
| `removeAt(index: int)` | Removes the comment at the given cell reference (no-op if none). |
| `removeAt(cellName: String)` | Removes the comment at the given cell reference (no-op if none). |

## See Also

- [Aspose.Cells — Enterprise API Reference](https://reference.aspose.com/cells/)
- [Aspose.Cells for Java — Enterprise API Reference](https://reference.aspose.com/cells/java/com.aspose.cells/commentcollection/)