ComponentOne Excel for .NET
C1.Excel Assembly / C1.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 System.Integer, _
       ByVal colIndex As System.Integer _
    ) As XLCell
    public XLCell this[ 
       System.int rowIndex,
       System.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