[]
        
(Showing Draft Content)

C1.Excel.XLCommentCollection.Add

Add Method

Add(XLComment)

Appends an XLComment object to the collection.

Declaration
public XLComment Add(XLComment comment)
Parameters
Type Name Description
XLComment comment

The XLComment object to add to the collection.

Returns
Type Description
XLComment

A reference to the object if it was successfully added to the collection, or null if the object could not be added to the collection (usually because it overlaps another comment already in the collection).

Add(int, int, string)

Creates an XLComment object and appends it to the collection.

Declaration
public XLComment Add(int rowIndex, int colIndex, string author)
Parameters
Type Name Description
int rowIndex

Index of the top row in the comment.

int colIndex

Index of the left column in the comment.

string author

The author of the comment.

Returns
Type Description
XLComment

A reference to the object if it was successfully added to the collection, or null if the object could not be added to the collection (usually because it overlaps another comment already in the collection).

Add(int, int, string, string)

Creates an XLComment object and appends it to the collection.

Declaration
public XLComment Add(int rowIndex, int colIndex, string author, string text)
Parameters
Type Name Description
int rowIndex

Index of the top row in the comment.

int colIndex

Index of the left column in the comment.

string author

The author of the comment.

string text

The context of the comment.

Returns
Type Description
XLComment

A reference to the object if it was successfully added to the collection, or null if the object could not be added to the collection (usually because it overlaps another comment already in the collection).

Add(int, int, string, string, bool)

Creates an XLComment object and appends it to the collection.

Declaration
public XLComment Add(int rowIndex, int colIndex, string author, string text, bool toRtf)
Parameters
Type Name Description
int rowIndex

Index of the top row in the comment.

int colIndex

Index of the left column in the comment.

string author

The author of the comment.

string text

The text of the comment.

bool toRtf

Flag indicating whether to convert author and text to RTF format.

Returns
Type Description
XLComment

A reference to the object if it was successfully added to the collection, or null if the object could not be added to the collection (usually because it overlaps another comment already in the collection).