Export (0) Print
Expand All

ListObject.InsertRowRange Property

[This documentation is for preview only, and is subject to change in later releases. Blank topics are included as placeholders.]

Gets a Range that represents the Insert row, if any, of the ListObject control.

Namespace:  Microsoft.Office.Tools.Excel
Assembly:  Microsoft.Office.Tools.Excel (in Microsoft.Office.Tools.Excel.dll)

Range InsertRowRange { get; }

Property Value

Type: Microsoft.Office.Interop.Excel.Range
A Range that represents the Insert row, if any, of the ListObject control.

If there is no Insert row, InsertRowRange returns null.

The following code example creates a ListObject, gets the range that contains the Insert row, and then displays a message showing how many cells the Insert row contains.

This example is for a document-level customization.

private void ListObject_InsertRowRange()
{
    Microsoft.Office.Tools.Excel.ListObject list1 =
        this.Controls.AddListObject(
        this.Range["A1", "C4"], "list1");

    Excel.Range insertRow = list1.InsertRowRange;
    MessageBox.Show("The insert row contains " + 
        insertRow.Cells.Count.ToString() +
        " cells.");
}

Show:
© 2014 Microsoft