ListObject::ListColumns Property
Gets a ListColumns collection that represents all the columns in the ListObject control.
Assembly: Microsoft.Office.Tools.Excel (in Microsoft.Office.Tools.Excel.dll)
Property Value
Type: Microsoft.Office.Interop.Excel::ListColumns^A ListColumns collection that represents all the columns in the ListObject control.
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 ListColumns.Item(1).Range.Delete(). Note that you cannot delete columns of a ListObject control that are bound to a data source.
The following code example creates a ListObject, gets the collection of columns, and then displays a message showing how many columns the ListObject contains.
This example is for a document-level customization.
Show: