PivotCache.Connection Property
Excel Developer Reference |
Returns or sets a string that contains one of the following: OLE DB settings that enable Microsoft Excel to connect to an OLE DB data source; ODBC settings that enable Microsoft Excel to connect to an ODBC data source; a URL that enables Microsoft Excel to connect to a Web data source; the path to and file name of a text file, or the path to and file name of a file that specifies a database or Web query. Read/write Variant.
Syntax
expression.Connection
expression An expression that returns a PivotCache object.
Remarks
When using an offline cube file, set the UseLocalConnection property to True and use the LocalConnection property instead of the Connection property.
Alternatively, you may choose to access a data source directly by using the Microsoft ActiveX Data Objects (ADO) library instead.
Example
This example creates a new PivotTable cache based on an OLAP provider, and then it creates a new PivotTable report based on the cache, at cell A3 on the active worksheet.
Visual Basic for Applications |
---|
|
See Also