Class WorksheetDataConnection (Excel VBA)

Used to import data into the data model from data on the worksheet such as ranges and tables.


Returns or sets the command string for the specified data source. Read/write Variant.


Returns or sets one of the XlCmdType enumeration constants. For a WorksheetDataConnection object, this type will be set to xlCmdExcel.

Possible Values are xlCmdCube - Contains a cube name for an OLAP data source, xlCmdDAX - Contains a Data Analysis Expressions (DAX) formula, xlCmdDefault - Contains command text that the OLE DB provider understands, xlCmdExcel - Contains an Excel formula, xlCmdList - Contains a pointer to list data, xlCmdSql - Contains an SQL statement, xlCmdTable - Contains a table name for accessing OLE DB data sources, xlCmdTableCollection - Contains the name of a table collection.


Returns the internal connection string to the object in Excel.


Returns an object that represents the parent object of the specified WorksheetDataConnection object. Read-only.