Back to Devexpress

PivotGridControl.SavePivotGridToFile(String, Boolean) Method

windowsforms-devexpress-dot-xtrapivotgrid-dot-pivotgridcontrol-dot-savepivotgridtofile-x28-system-dot-string-system-dot-boolean-x29.md

latest3.1 KB
Original Source

PivotGridControl.SavePivotGridToFile(String, Boolean) Method

SECURITY-RELATED CONSIDERATIONS

Using file paths sourced from untrusted input may expose unauthorized files or allow unintended file access. Always validate and normalize all external paths to prevent path manipulation.

Saves the Pivot Grid Control’s data and full layout to the specified file, and allows the data to be compressed.

Namespace : DevExpress.XtraPivotGrid

Assembly : DevExpress.XtraPivotGrid.v25.2.dll

NuGet Package : DevExpress.Win.PivotGrid

Declaration

csharp
public void SavePivotGridToFile(
    string path,
    bool compress
)
vb
Public Sub SavePivotGridToFile(
    path As String,
    compress As Boolean
)

Parameters

NameTypeDescription
pathString

A string that specifies the path to the file in which the control’s data and layout will be saved.

| | compress | Boolean |

true to compress the output file; otherwise, false.

|

Remarks

You can disable data compression if this affects data saving/loading performance. For data compression, this method uses the Deflate algorithm (a combination of the LZ77 algorithm and Huffman coding). See the DeflateStream topic in MSDN for more details.

For information on using the SavePivotGridToFile method, see another method overload.

Note

In OLAP and Server Mode, you cannot save pivot grid data to a file / stream.

Note

Saving PivotGrid’s data to a file or stream is not supported for Server Mode and OLAP data sources.

See Also

SavePivotGridToStream

DataSource

Local Data Stores

Save and Restore Layout

PivotGridControl Class

PivotGridControl Members

DevExpress.XtraPivotGrid Namespace