PivotTable.ChangeConnection(WorkbookConnection) Method
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Changes the connection of the specified PivotTable.
public:
void ChangeConnection(Microsoft::Office::Interop::Excel::WorkbookConnection ^ conn);
public void ChangeConnection (Microsoft.Office.Interop.Excel.WorkbookConnection conn);
Public Sub ChangeConnection (conn As WorkbookConnection)
Parameters
- conn
- WorkbookConnection
Required WorkbookConnection object that represents the new connection for the PivotTable.
Remarks
The ChangeConnection(WorkbookConnection) method can only be used with a PivotTable that is connected to an external data source. A run-time error will occur if the ChangeConnection(WorkbookConnection) method is used with a PivotTable that uses data stored on a worksheet as its data source.
Applies to
Feedback
https://aka.ms/ContentUserFeedback.
Coming soon: Throughout 2024 we will be phasing out GitHub Issues as the feedback mechanism for content and replacing it with a new feedback system. For more information see:Submit and view feedback for