Spread WPF Documentation
GrapeCity.Windows.SpreadSheet.Data Namespace / Worksheet Class / RowCount Property
Example


In This Topic
    RowCount Property (Worksheet)
    In This Topic
    Gets or sets the number of rows in the sheet.
    Syntax
    'Declaration
     
    <DefaultValueAttribute(500)>
    Public Property RowCount As Integer
    'Usage
     
    Dim instance As Worksheet
    Dim value As Integer
     
    instance.RowCount = value
     
    value = instance.RowCount
    [DefaultValue(500)]
    public int RowCount {get; set;}

    Property Value

    The number of rows in the sheet.
    Example
    This example uses the RowCount property.
    for (int rowIndex = 0; rowIndex < this.gcSpreadSheet1.ActiveSheet.RowCount; rowIndex++)
                {
                    for (int colIndex = 0; colIndex < this.gcSpreadSheet1.ActiveSheet.ColumnCount; colIndex++)
                    {
                        this.gcSpreadSheet1.Sheets[0].SetValue(rowIndex, colIndex, rowIndex * 10 + colIndex);
                    }
                }
    For rowIndex As Integer = 0 To Me.gcSpreadSheet1.ActiveSheet.RowCount - 1
                For colIndex As Integer = 0 To Me.GcSpreadSheet1.ActiveSheet.ColumnCount - 1
                    Me.GcSpreadSheet1.Sheets(0).SetValue(rowIndex, colIndex, rowIndex * 10 + colIndex)
                Next
            Next
    See Also