PivotTable.SourceData Property
Returns the data source for the PivotTable report. Read-write Object.
Namespace: Microsoft.Office.Interop.Excel
Assembly: Microsoft.Office.Interop.Excel (in Microsoft.Office.Interop.Excel.dll)
Syntax
'Declaration
Property SourceData As Object
Get
Set
'Usage
Dim instance As PivotTable
Dim value As Object
value = instance.SourceData
instance.SourceData = value
Object SourceData { get; set; }
Property Value
Type: System.Object
Remarks
The value returned depends on the data source, as follows:
Data source |
Return value |
---|---|
Microsoft Excel list or database |
The cell reference, as text. |
External data source |
An array. Each row consists of a SQL connection string with the remaining elements as the query string, broken down into 255-character segments. |
Multiple consolidation ranges |
A two-dimensional array. Each row consists of a reference and its associated page field items. |
Another PivotTable report |
One of the above three kinds of information. |
This property is not available for OLE DB data sources.