ListObject::ListRows Property
Gets a ListRows object that represents all the rows of data in the ListObject control.
Assembly: Microsoft.Office.Tools.Excel (in Microsoft.Office.Tools.Excel.dll)
Property Value
Type: Microsoft.Office.Interop.Excel::ListRows^A ListRows object that represents all the rows of data in the ListObject control.
The ListRows object returned does not include the header, Total, or Insert rows.
To delete any items from this collection, do not use the Delete method of the item. Use the Delete method of the range of the item to delete the item; for example ListRows.Item(1).Range.Delete().
The following code example creates a ListObject, gets the collection of rows, and then displays a message showing how many rows the ListObject contains.
This example is for a document-level customization.
Show: