Skip to main content
All docs
V23.2
Row

ThreadedCommentCollection.GetThreadedComments(CellRange) Method

Retrieves all comments applied to the specified cell range.

Namespace: DevExpress.Spreadsheet

Assembly: DevExpress.Spreadsheet.v23.2.Core.dll

NuGet Package: DevExpress.Spreadsheet.Core

Declaration

IList<ThreadedComment> GetThreadedComments(
    CellRange range
)

Parameters

Name Type Description
range CellRange

A cell range that contains comments that should be returned.

Returns

Type Description
IList<ThreadedComment>

A collection of threaded comments within the specified range of cells.

Remarks

The GetThreadedComments method returns all threaded comments contained in cell ranges that intersect the specified cell range. To check whether a comment is contained in the worksheet, use the ThreadedCommentCollection.Contains method.

Example

The code sample below obtains all comments added to the A1:G20 cell range:

using DevExpress.Spreadsheet;

var workbook = new Workbook();
workbook.LoadDocument(@"C:\Docs\Comments.xlsx");
Worksheet worksheet = workbook.Worksheets[0];
var comments = worksheet.ThreadedComments.GetThreadedComments(worksheet["A1:G20"]);

The following code snippet (auto-collected from DevExpress Examples) contains a reference to the GetThreadedComments(CellRange) method.

Note

The algorithm used to collect these code examples remains a work in progress. Accordingly, the links and snippets below may produce inaccurate results. If you encounter an issue with code examples below, please use the feedback form on this page to report the issue.

See Also