Compartilhar via


PivotCache.LocalConnection Property

Returns or sets the connection string to an offline cube file.

Namespace:  Microsoft.Office.Interop.Excel
Assembly:  Microsoft.Office.Interop.Excel (in Microsoft.Office.Interop.Excel.dll)

Syntax

'Declaration
Property LocalConnection As Object
    Get
    Set
'Usage
Dim instance As PivotCache
Dim value As Object

value = instance.LocalConnection

instance.LocalConnection = value
Object LocalConnection { get; set; }

Property Value

Type: System.Object

Remarks

For a non-OLAP data source, the value of the LocalConnection property is an empty string, and the UseLocalConnection property is set to False.

Setting the LocalConnection property doesn’t immediately initiate the connection to the data source. You must first use the Refresh method to make the connection and retrieve the data.

The value of the LocalConnection property is used if the UseLocalConnection property is set to True. If the UseLocalConnection property is set to False, the Connection property specifies the connection string for query tables based on sources other than local cube files.

For more information about the syntax for connection strings, see the Help topic for the Add method of the PivotTables collection.

See Also

Reference

PivotCache Interface

PivotCache Members

Microsoft.Office.Interop.Excel Namespace