ExcelFile.CommentRowCount Method
Maximum row index including comments.
Remarks
There are 2 groups of Comment related methods. One is used when you want to find out on a loop all existing comments on a range, and the other is used to get/set comments at a specified position (row and col). To loop among all existing comments, you can use CommentRowCount together with CommentCountRow. Do not confuse them, even when they have similar names. CommentRowCount returns the maximum row with a comment, and CommentCountRow returns the number of comments in a given row.
Syntax
Namespace: FlexCel.Core
public abstract Int32 CommentRowCount()
Examples
You can loop on all the comments on a sheet with the following code:
for (int row = 1; row <= xls.CommentRowCount(); row++)
{
for (int commentIndex = 1; commentIndex <= xls.CommentCountRow(row); commentIndex++)
{
DoSomething(xls.GetCommentRow(row, commentIndex));
}
}