Excel for WPF | ComponentOne
C1.WPF.Excel Namespace / XLSheet Class / GetCell Method
Index of the row.
Index of the column.

In This Topic
    GetCell Method (XLSheet)
    In This Topic
    Gets a reference to a cell at the specified coordinates or null if the cell doesn't exist.
    Syntax
    'Declaration
     
    
    Public Function GetCell( _
       ByVal rowIndex As Integer, _
       ByVal colIndex As Integer _
    ) As XLCell
    public XLCell GetCell( 
       int rowIndex,
       int colIndex
    )

    Parameters

    rowIndex
    Index of the row.
    colIndex
    Index of the column.

    Return Value

    A reference to the XLCell object at the specified coordinates, or null if there is no cell at the specified position.
    Remarks

    To populate new sheets, use the C1XLBook.Sheets indexer instead.

    The indexer will automatically create new rows, columns, and cells as needed, and will never return null.

    See Also