We're sorry Aspose doesn't work properply without JavaScript enabled.

Free Support Forum - aspose.com

Saving Pivottable as mht

I use the example
<w:WordDocument>
<w:View>Normal</w:View>
<w:Zoom>0</w:Zoom>
<w:TrackMoves/>
<w:TrackFormatting/>
<w:HyphenationZone>21</w:HyphenationZone>
<w:PunctuationKerning/>
<w:ValidateAgainstSchemas/>
<w:SaveIfXMLInvalid>false</w:SaveIfXMLInvalid>
<w:IgnoreMixedContent>false</w:IgnoreMixedContent>
<w:AlwaysShowPlaceholderText>false</w:AlwaysShowPlaceholderText>
<w:DoNotPromoteQF/>
<w:LidThemeOther>DA</w:LidThemeOther>
<w:LidThemeAsian>X-NONE</w:LidThemeAsian>
<w:LidThemeComplexScript>X-NONE</w:LidThemeComplexScript>
<w:Compatibility>
<w:BreakWrappedTables/>
<w:SnapToGridInCell/>
<w:WrapTextWithPunct/>
<w:UseAsianBreakRules/>
<w:DontGrowAutofit/>
<w:SplitPgBreakAndParaMark/>
<w:EnableOpenTypeKerning/>
<w:DontFlipMirrorIndents/>
<w:OverrideTableStyleHps/>
</w:Compatibility>
<w:BrowserLevel>MicrosoftInternetExplorer4</w:BrowserLevel>
<m:mathPr>
<m:mathFont m:val=“Cambria Math”/>
<m:brkBin m:val=“before”/>
<m:brkBinSub m:val="–"/>
<m:smallFrac m:val=“off”/>
<m:dispDef/>
<m:lMargin m:val=“0”/>
<m:rMargin m:val=“0”/>
<m:defJc m:val=“centerGroup”/>
<m:wrapIndent m:val=“1440”/>
<m:intLim m:val=“subSup”/>
<m:naryLim m:val=“undOvr”/>
</m:mathPr></w:WordDocument>
<![endif]–>

http://www.aspose.com/docs/display/cellsjava/Create+Pivot+Tables+and+Pivot+Charts

/* Style Definitions */ table.MsoNormalTable {mso-style-name:"Table Normal"; mso-tstyle-rowband-size:0; mso-tstyle-colband-size:0; mso-style-noshow:yes; mso-style-priority:99; mso-style-parent:""; mso-padding-alt:0cm 5.4pt 0cm 5.4pt; mso-para-margin:0cm; mso-para-margin-bottom:.0001pt; mso-pagination:widow-orphan; font-size:10.0pt; font-family:"Times New Roman","serif";}

<![endif]–>for creating pivottable and save as mht. I open the mht file in IE8 (also tried IE9), the table on tab 1 is displayed fine, but the pivottable on tab 2 is not displayed. If I open the generated xls file in excel 14.0.7113.5005 (32-bit) and save as mht and open in IE the pivottable displays fine.

The generated mht file from aspose cells is different as seems to use mso files which the Save As in excel doesn’t.

Please find relevant files attached.

Kind regards

Hi Kristien,

Thanks for your posting and using Aspose.Cells for Java.

We were able to observe this issue. The pivot table does not display in the output mhtml. We have logged this issue in our database for investigation and fix. We will look into it and fix this issue. Once, the issue is resolved or we have some other update for you, we will let you know asap.

This issue has been logged as CELLSJAVA-40739.

Hi,

Thanks for using Aspose.Cells.

Please download and try the latest version: Aspose.Cells
for Java v8.0.2.1
.

Please call the method named PivotTable.refreshData() and the method named PivotTable.calculateData() before saving PivotTable as mht or html.

Please see the following sample code.

Java


Workbook wb = new Workbook(“pivotTable_test.xls”);

PivotTable pt = wb.getWorksheets().get(1).getPivotTables().get(0);

pt.setRefreshDataFlag(true);

pt.refreshData();

pt.calculateData();

pt.setRefreshDataFlag(false);

pt.setRefreshDataOnOpeningFile(false);

wb.save(“out.mht”);

The issues you have found earlier (filed as CELLSJAVA-40739) have been fixed in this update.


This message was posted using Notification2Forum from Downloads module by Aspose Notifier.