Pivot Table Export to HTML dosesn't work

B

basseltabbara

I am using VB Script to export a pivot table to HTML. After exporting
the file, I am saving it to the temp folder using FileSystemObject.
Therefore the file is saved as HTML.
I am facing two problems: First, after checking th file that is
created, I noticed that it is saved as XML containing the data but
doesn't include the Table Tag which displays the data.
Please see the example at the ned of this message.
The second problem that I face and it might be related to the first
one, I transformed the html text coming out of the Export function to
binary, I saved to database, than I retrieve it back from servr side
cde. When I retrieve it and open the file in excel, all the code below
apperas in Excel and it is not rendered as it should supposed to.
I appreciate your help. Thanks in advance.

The XML that is saved as HTML page in the Temp folder:
<!--[if gte mso 9]><xml>
<x:ExcelWorkbook>
<x:ExcelWorksheets>
<x:ExcelWorksheet>
<x:Name>Sheet1</x:Name>
<x:WorksheetOptions>
<x:Selected/>
<x:DefaultRowHeight>Automatic</x:DefaultRowHeight>
<x:panes>
<x:pane>
<x:Number>3</x:Number>
<x:ActiveRow>2</x:ActiveRow>
</x:pane>
</x:panes>
</x:WorksheetOptions>
<x:pivotTable>
<x:pLExport/>
<x:NoDisplayAlerts/>
<x:DisplayScreenTips/>
<x:NoAutoFit/>
<x:Height>217</x:Height>
<x:Width>502</x:Width>
<x:CubeProvider>msolap.2</x:CubeProvider>
<x:CacheDetails/>
<x:Location>A3:A3</x:Location>
<x:Name>Population Forecast</x:Name>
<x:pivotField>
<x:Name>Year</x:Name>
<x:EncodedType>adVarWChar</x:EncodedType>
<x:CompareOrderedMembersBy>UniqueName</x:CompareOrderedMembersBy>
</x:pivotField>
<x:pivotField>
<x:Name>Gender</x:Name>
<x:EncodedType>adVarWChar</x:EncodedType>
<x:CompareOrderedMembersBy>UniqueName</x:CompareOrderedMembersBy>
</x:pivotField>
<x:pivotField>
<x:Name>Val</x:Name>
<x:DataType>Number</x:DataType>
<x:FilterCaption>Data</x:FilterCaption>
<x:pLDataOrientation/>
<x:EncodedType>adNumeric</x:EncodedType>
<x:CompareOrderedMembersBy>UniqueName</x:CompareOrderedMembersBy>
</x:pivotField>
<x:pivotField>
<x:Name>Data</x:Name>
<x:Orientation>Column</x:Orientation>
<x:position>-1</x:position>
<x:DataField/>
</x:pivotField>
<x:pivotField>
<x:Name>Sum of Val</x:Name>
<x:pLName>Total1</x:pLName>
<x:Orientation>Data</x:Orientation>
<x:position>1</x:position>
<x:parentField>Val</x:parentField>
</x:pivotField>
<x:pTSource>
</x:pTSource>
<x:pivotView>
<x:Label>
<x:Caption>Population Forecast</x:Caption>
</x:Label>
</x:pivotView>
</x:pivotTable>
</x:ExcelWorksheet>
</x:ExcelWorksheets>
</x:ExcelWorkbook>
</xml><![endif]-->
 
R

Richard

Hi,
What do you mean by this:
"...doesn't include the Table Tag which displays the data..."
???
I transformed the html text coming out of the Export function to
binary, I saved to database, than I retrieve it back from servr side
cde. When I retrieve it and open the file in excel, all the code below
apperas in Excel and it is not rendered as it should supposed to
Can you open it in excel before saving to sql?
Why are you saving in binary???
Ta,
Richard
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top