CommentCollection
Overview
CommentCollection is a class in Aspose.Cells FOSS for .NET.
Represents the collection of comments (legacy notes) on a worksheet. Comments allow you to add text annotations to cells for documentation or collaboration. Each comment is anchored to a specific cell and can be accessed by index or cell reference. Comments support author information, visibility control, and custom box sizing. Multiple comments can be added to the same worksheet, though each cell can only have one comment. var workbook = new Workbook(); var worksheet = workbook.Worksheets[0]; // Add comments to different cells worksheet.Comments.Add(“A1”); worksheet.Comments.Add(“B1”); worksheet.Comments.Add(“C1”); // Configure the comments worksheet.Comments[“A1”].Author = “Reviewer 1”; worksheet.Comments[“B1”].Author = “Reviewer 2”; worksheet.Comments[“C1”].Author = “Reviewer 3”;
This class provides 2 methods for working with CommentCollection objects in .NET programs.
Available methods include: Add, RemoveAt.
All exported members are accessible to any .NET application after installing the Aspose.Cells FOSS for .NET package.
Properties: Count.
Description
CommentCollection is a class in the Aspose.Cells FOSS library for .NET that exposes 4 methods and 1 property for programmatic use.
The class also provides the Count property (gets the count).
Properties
| Name | Type | Access | Description |
|---|---|---|---|
Count | int | Read | Gets the count. |
Methods
| Signature | Description |
|---|---|
Add(row: int, column: int) | Adds an empty comment at the given zero-based cell coordinates and returns it. |
Add(cellName: string) | Adds an empty comment at the given zero-based cell coordinates and returns it. |
RemoveAt(index: int) | Removes the comment at the given zero-based index. |
RemoveAt(cellName: string) | Removes the comment at the given zero-based index. |