Skip to main content

DevExpress v24.2 Update — Your Feedback Matters

Our What's New in v24.2 webpage includes product-specific surveys. Your response to our survey questions will help us measure product satisfaction for features released in this major update and help us refine our plans for our next major release.

Take the survey Not interested

PivotGridControl.ExportToMht(String, String) Method

Exports the Pivot Grid Control’s data to an MHT file (Web archive, single file) at the specified path and with the specified encoding.

Namespace: DevExpress.XtraPivotGrid

Assembly: DevExpress.XtraPivotGrid.v24.2.dll

NuGet Package: DevExpress.Win.PivotGrid

#Declaration

public void ExportToMht(
    string filePath,
    string htmlCharSet
)

#Parameters

Name Type Description
filePath String

A String which specifies the full path (including the file name and extension) to where the MHT file will be created.

htmlCharSet String

A String which specifies the encoding name set in the MHT document (e.g. “UTF-8”).

#Remarks

This method overwrites any files present at the specified path that have the same name without warning. Note that the .mht (or an appropriate) extension has to be specified in the path. After an MHT document has been created, it can be displayed in a Web browser.

The Pivot Grid Control’s data can only be exported if the XtraPrinting Library is available. Use the PivotGridControl.IsPrintingAvailable property to check whether the grid’s data can be exported.

See Also