BUG: Background Colors in PivotTable Do Not Paste Into Excel (316586)
The information in this article applies to:
- Microsoft Office 2003 Web Components
- Microsoft Office XP Web Components
This article was previously published under Q316586 SYMPTOMS When you paste the contents of a PivotTable component into
a Microsoft Excel workbook, background colors in the PivotTable are not
transferred to the workbook. CAUSE When you copy a PivotTable, an HTML representation of the
PivotTable is sent to the clipboard for paste operations. The resulting HTML on
the clipboard is missing a default style attribute for cells (<TD>).
RESOLUTIONWith the HTML for a PivotTable, the default style for a cell
is the following:
mso-pattern:auto;
However, it should be the following:
mso-pattern:auto none;
To correct this problem with the Copy command, you can use script to retrieve the HTMLData property for the PivotTable, modify the style attribute, and then
automate Excel to view the modified HTML. To view the HTML, you can use either
of the following methods:
- Save the modified HTML to a file and then open the HTML
file in Excel. -or-
- Manipulate the HTMLProject in the workbook to insert the modified HTML into a
worksheet.
Both of these workarounds are illustrated in the "More
Information" section. NOTE: The workarounds that are discussed in this article involve
Automation to Excel. For Excel Automation to work in Internet Explorer, your
security settings must allow for initialization and scripting of ActiveX
controls that are not marked as safe.
For additional information, click the article
number below to view the article in the Microsoft Knowledge Base: 195826 PRB: CreateObject Fails from Client-Side Scripts
STATUS
Microsoft has confirmed that this is a bug in the Microsoft products that are
listed at the beginning of this article.
REFERENCES For more information about the Office Web Components, see
the following Microsoft Developer Network (MSDN) Web site:
Modification Type: | Major | Last Reviewed: | 4/27/2006 |
---|
Keywords: | kbbug kbOfficeWebPivot kbpending KB316586 |
---|
|