Search Results for

    Show / Hide Table of Contents

    ExcelFile.CommentCountRow Method

    Number of comments on a given row.

    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 CommentCountRow(Int32 row)

    Parameters

    <-> Parameter Type Description
    row Int32 Row index (1 based)

    Returns

    The number of comments on a given row.

    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));
            }
        }
    

    See also

    • ExcelFile
    • CommentRowCount
    • GetCommentRow
    • GetCommentRowCol
    • GetComment
    • SetCommentRow(Int32, Int32, String, TImageProperties)
    • SetComment(Int32, Int32, TRichString)
    • GetCommentPropertiesRow
    • SetCommentPropertiesRow
    • SetCommentProperties
    In This Article
    Back to top FlexCel Studio for the .NET Framework v7.24.0.0
    © 2002 - 2025 tmssoftware.com