ComponentOne Excel for UWP
Worksheets
Using Excel for UWP > Worksheets

Worksheets are the individual grids contained in an Excel file. They are represented by XLSheet objects accessible through the Sheets property in the C1XLBook class. Each sheet has a name and contains a collection of rows and columns. Individual cells can be accessed using the XLSheet indexer, which takes row and column indices.

The XLSheet.Rows and XLSheet.Columns collections in the XLSheet object extend automatically when you use their indexers. For example, if you write the following code and the sheet has fewer than 1001 rows, new rows will be automatically added, and a valid row will be returned. The same applies to XLColumn and XLCell indexers. This is different from the behavior of most collection indexers in .NET, but it makes it very easy to create and populate XLSheet objects.

Visual Basic
Copy Code
Dim sheet As XLSheet = book.Sheets(0)
Dim row As XLRow = sheet.Rows(1000)

 

C#
Copy Code
XLSheet sheet = book.Sheets[0];
XLRow row = sheet.Rows[1000];
See Also