Excel for WPF | ComponentOne
C1.Silverlight.Excel Namespace / XLSheet Class / Item Property

In This Topic
    Item Property (XLSheet)
    In This Topic
    Gets the cell at a specified position on the sheet, creating a new cell if necessary.
    Syntax
    'Declaration
     
    
    Public ReadOnly Default Property Item( _
       ByVal rowIndex As Integer, _
       ByVal colIndex As Integer _
    ) As XLCell
    public XLCell this[ 
       int rowIndex,
       int colIndex
    ]; {get;}

    Parameters

    rowIndex
    colIndex
    Remarks

    If the specified cell doesn't exist when the indexer is invoked, the sheet will be expanded and a new cell will be created, then returned. This makes it easy to create and populate sheets.

    If you want to determine whether a specific cell has been defined, use the GetCell method instead.

    The indexer is generally more useful when creating and populating sheets. The GetCell method is more useful when loading existing sheets.

    See Also