2.42.18 Rows


Description

The Rows property is an integer value that holds the number of rows in the worksheet.

Syntax

VB: Property Get/Let Rows As Integer
C++: int Rows
C#: int Rows

Parameters

Remark

Examples

VBA

Private Sub AddRowsToWorksheet(sheetName As String, numRows As Integer)
    Dim app As Origin.ApplicationSI
    Set app = New Origin.ApplicationSI
 
    Dim wks As Origin.Worksheet
    Set wks = app.FindWorksheet(sheetName)
    If wks Is Nothing Then
        MsgBox ("Failed to find worksheet")
        Exit Sub
    End If

    wks.Rows = wks.Rows + numRows
End Sub

C#

using Origin; // allow using Worksheet without having to write Origin.Worksheet

static void AddRowsToWorksheet(string strSheetName, int nRows)
{
    ApplicationSI app = new Origin.ApplicationSI();

    Worksheet wks = app.FindWorksheet(strSheetName);
    if (wks == null)
    {
        Console.WriteLine("Failed to find worksheet");
        return;
    }

    wks.Rows += nRows;
}

Version Information

8.0SR2

See Also

OriginCOM:Worksheet-Cols