SpreadsheetControl.SaveDocument(String, DocumentFormat) 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 control’s document to a file, specifying the document format.
Namespace: DevExpress.XtraSpreadsheet
Assembly: DevExpress.XtraSpreadsheet.v25.2.dll
NuGet Package: DevExpress.Win.Spreadsheet
Declaration
Parameters
| Name | Type | Description |
|---|---|---|
| fileName | String | A string value specifying the path to a file in which to save the control’s document. |
| format | DocumentFormat | One of the DocumentFormat enumeration values. |
Remarks
Use the SpreadsheetControl.Options.Export property that returns the WorkbookExportOptions object to set global export options, or handle the SpreadsheetControl.BeforeExport event to specify options for an individual export action.
Related GitHub Examples
The following code snippet (auto-collected from DevExpress Examples) contains a reference to the SaveDocument(String, DocumentFormat) method.
Note
The algorithm used to collect these code examples remains a work in progress. Accordingly, the links and snippets below may produce inaccurate results. If you encounter an issue with code examples below, please use the feedback form on this page to report the issue.