Using the ListObjects Collection
The ListObjects collection is a collection of all the ListObject objects on a worksheet. A ListObject object represents an XML list in a Spreadsheet component. The ListObject object is a member of the ListObjects collection.
Individual ListObject objects in the ListObjects collection are indexed beginning with 1 for the first object, 2 for the second object, and so forth. You use the Item property to return a single ListObject object from the ListObjects collection. The argument for the Item property is the name or the index number in the ListObjects collection of the ListObject object. The name is the value of the IDattribute of an MapInfo/Map/Entry in an XML Spreadsheet file. The XML fragment where these details appear in the XML Spreadsheet file looks something like the following:
<x2:MapInfo xmlns:x2="http://schemas.microsoft.com/office/excel/2003/xml"> <x2:Map x2:ID="Cust_MapId"> <x2:Entry x2:ID="example_id" x2:Type="table"> ... </x2:Entry> </x2:Map> </x2:MapInfo>
In the example above, the IDvalue is example_id. You can also get the name by using the Name property of the ListObject object. Using Microsoft Excel, you can create an XML Spreadsheet file by creating a data bound spreadsheet and then saving the workbook as an XML Spreadsheet.
You use the read-only Count property to return the number of objects in the ListObjects collection. Using the Application and Parent properties will return the Spreadsheet component and the parent object (which is the Worksheet object) for the specified ListObjects collection.
Parent Objects | Worksheet Object