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/>
<xefaultRowHeight>Automatic</xefaultRowHeight>
<xanes>
<xane>
<x:Number>3</x:Number>
<x:ActiveRow>2</x:ActiveRow>
</xane>
</xanes>
</x:WorksheetOptions>
<xivotTable>
<xLExport/>
<x:NoDisplayAlerts/>
<xisplayScreenTips/>
<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>
<xivotField>
<x:Name>Year</x:Name>
<x:EncodedType>adVarWChar</x:EncodedType>
<x:CompareOrderedMembersBy>UniqueName</x:CompareOrderedMembersBy>
</xivotField>
<xivotField>
<x:Name>Gender</x:Name>
<x:EncodedType>adVarWChar</x:EncodedType>
<x:CompareOrderedMembersBy>UniqueName</x:CompareOrderedMembersBy>
</xivotField>
<xivotField>
<x:Name>Val</x:Name>
<xataType>Number</xataType>
<x:FilterCaption>Data</x:FilterCaption>
<xLDataOrientation/>
<x:EncodedType>adNumeric</x:EncodedType>
<x:CompareOrderedMembersBy>UniqueName</x:CompareOrderedMembersBy>
</xivotField>
<xivotField>
<x:Name>Data</x:Name>
<x:Orientation>Column</x:Orientation>
<xosition>-1</xosition>
<xataField/>
</xivotField>
<xivotField>
<x:Name>Sum of Val</x:Name>
<xLName>Total1</xLName>
<x:Orientation>Data</x:Orientation>
<xosition>1</xosition>
<xarentField>Val</xarentField>
</xivotField>
<xTSource>
</xTSource>
<xivotView>
<x:Label>
<x:Caption>Population Forecast</x:Caption>
</x:Label>
</xivotView>
</xivotTable>
</x:ExcelWorksheet>
</x:ExcelWorksheets>
</x:ExcelWorkbook>
</xml><![endif]-->
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/>
<xefaultRowHeight>Automatic</xefaultRowHeight>
<xanes>
<xane>
<x:Number>3</x:Number>
<x:ActiveRow>2</x:ActiveRow>
</xane>
</xanes>
</x:WorksheetOptions>
<xivotTable>
<xLExport/>
<x:NoDisplayAlerts/>
<xisplayScreenTips/>
<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>
<xivotField>
<x:Name>Year</x:Name>
<x:EncodedType>adVarWChar</x:EncodedType>
<x:CompareOrderedMembersBy>UniqueName</x:CompareOrderedMembersBy>
</xivotField>
<xivotField>
<x:Name>Gender</x:Name>
<x:EncodedType>adVarWChar</x:EncodedType>
<x:CompareOrderedMembersBy>UniqueName</x:CompareOrderedMembersBy>
</xivotField>
<xivotField>
<x:Name>Val</x:Name>
<xataType>Number</xataType>
<x:FilterCaption>Data</x:FilterCaption>
<xLDataOrientation/>
<x:EncodedType>adNumeric</x:EncodedType>
<x:CompareOrderedMembersBy>UniqueName</x:CompareOrderedMembersBy>
</xivotField>
<xivotField>
<x:Name>Data</x:Name>
<x:Orientation>Column</x:Orientation>
<xosition>-1</xosition>
<xataField/>
</xivotField>
<xivotField>
<x:Name>Sum of Val</x:Name>
<xLName>Total1</xLName>
<x:Orientation>Data</x:Orientation>
<xosition>1</xosition>
<xarentField>Val</xarentField>
</xivotField>
<xTSource>
</xTSource>
<xivotView>
<x:Label>
<x:Caption>Population Forecast</x:Caption>
</x:Label>
</xivotView>
</xivotTable>
</x:ExcelWorksheet>
</x:ExcelWorksheets>
</x:ExcelWorkbook>
</xml><![endif]-->