Microsoft KB Archive/207522

= XL2000: Error Loading PivotTable Containing Two Fields with Same Name =

Article ID: 207522

Article Last Modified on 11/5/2003

-

APPLIES TO


 * Microsoft Excel 2000 Standard Edition
 * Microsoft Office PivotTable Component 9.0, run time

-



This article was previously published under Q207522



SYMPTOMS
When you open a Web page that contains a Microsoft Office PivotTable Component, you may receive the following error message:

An error occurred while trying to use a query published from Excel. Consult the creator of the Web page.

0x800a6986: Cannot use a stored procedure, query or SQL command that does not have unique names or aliases for all output fields.

When you click OK, you receive an error message similar to the following:

The PivotTable list "PivotTable2" could not connect to the data source "XLDataSource". For more information about the data source, consult the creator of the file.

0x80040e14: "[Microsoft][ODBC SQL Server Driver][SQL Server]Invalid object name 'XLDataSource'."



CAUSE
This problem may occur when the following conditions are true:


 * You published the Office PivotTable using a PivotTable stored on a Microsoft Excel worksheet.

-and-


 * You created the Excel PivotTable from data stored in an external SQL database.

-and-


 * You added one or more of the database fields to the Excel PivotTable twice.



WORKAROUND
To work around this problem, change the column heading used for one of the duplicate fields in Microsoft Query. To do this, follow these steps:


 * 1) Open the Excel workbook containing the PivotTable that was used to publish the Web page.
 * 2) Select a cell within the PivotTable, and then click PivotTable and PivotChart Report on the Data menu.

The PivotTable and PivotChart Wizard opens in step 3 of the wizard.
 * 1) Click Back.
 * 2) Click Get Data. Click OK if you receive the error message: "This query cannot be edited by the Query Wizard."

Microsoft Query opens with the query that was used to create the PivotTable.
 * 1) Click to select one of the duplicate columns in the Data pane.
 * 2) Click Edit Column on the Records menu. Type a unique name for the column in the Column Heading box, and then click OK.
 * 3) Click Return Data to Microsoft Excel on the File menu.
 * 4) Click Finish in the PivotTable and PivotChart Wizard.
 * 5) Because one of the column names has changed, one or more fields are now missing from your PivotTable. Drag the newly renamed field from the PivotTable toolbar to the appropriate area on the PivotTable.
 * 6) Republish the PivotTable.

Additional query words: pivotlist XL2000

Keywords: kbprb KB207522

-

[mailto:TECHNET@MICROSOFT.COM Send feedback to Microsoft]

© Microsoft Corporation. All rights reserved.