Name

listcolumn.XPath

Synopsis

If a list has been created from imported XML data, returns a reference to the column’s XPath object. If the list was not created from XML data, returns Nothing. For example, the following code displays the XPath of each column in the Immediate window:

Set ws = ThisWorkbook.Worksheets("Sheet1")
Set lst = ws.ListObjects("XML List")
For Each col In lst.ListColumns
    Debug.Print col.XPath.Value
Next

For more information on the XPath object, see Chapter 15.

Get Programming Excel with VBA and .NET now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.