[Root] / Xceed.Workbooks.NET Assembly / Xceed.Workbooks.NET Namespace / Worksheet Class / InsertRows Method
The Id of the Row that is currently located where the new Rows will be inserted. The Ids start at 0.
The number of Rows that will be inserted. The default value is 1.


In This Topic
    InsertRows Method
    In This Topic
    Inserts new Rows at a specific index in the Worksheet.
    Syntax
    'Declaration
     
    
    Public Sub InsertRows( _
       ByVal rowId As Integer, _
       Optional ByVal count As Integer _
    ) 
    'Usage
     
    
    Dim instance As Worksheet
    Dim rowId As Integer
    Dim count As Integer
     
    instance.InsertRows(rowId, count)
    public void InsertRows( 
       int rowId,
       int count
    )

    Parameters

    rowId
    The Id of the Row that is currently located where the new Rows will be inserted. The Ids start at 0.
    count
    The number of Rows that will be inserted. The default value is 1.
    Remarks

    As in Microsoft Excel, the newly inserted Rows will have the same Style as the Row that precedes the insertion point.

    All the Rows that follow the insertion point will also be shifted down to leave some place for the newly inserted Rows.

    Supported Frameworks

    .NET: net5.0, net5.0-windows, net6.0, net6.0-macos, net6.0-windows, net7.0, net7.0-macos, net7.0-windows, net8.0, net8.0-browser, net8.0-macos, net8.0-windows, net9.0, net9.0-browser, net9.0-macos, net9.0-windows, net10.0, net10.0-browser, net10.0-macos, net10.0-windows.

    .NET Framework: net40, net403, net45, net451, net452, net46, net461, net462, net463, net47, net471, net472, net48, net481.

    See Also