Back to Devexpress

SpreadsheetControl.SaveDocument(String) Method

wpf-devexpress-dot-xpf-dot-spreadsheet-dot-spreadsheetcontrol-dot-savedocument-x28-system-dot-string-x29.md

latest2.0 KB
Original Source

SpreadsheetControl.SaveDocument(String) 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 document to the specified file in the Excel or text format. The file format is identified by the file extension.

Namespace : DevExpress.Xpf.Spreadsheet

Assembly : DevExpress.Xpf.Spreadsheet.v25.2.dll

NuGet Package : DevExpress.Wpf.Spreadsheet

Declaration

csharp
public void SaveDocument(
    string fileName
)
vb
Public Sub SaveDocument(
    fileName As String
)

Parameters

NameTypeDescription
fileNameString

Specifies the file path to save the document to.

|

Remarks

The DocumentFormat enumeration lists the supported document formats. To export a file to PDF or HTML, use the SpreadsheetControl.ExportToPdf and SpreadsheetControl.ExportToHtml methods.

See Also

How to: Save a Spreadsheet Document

SpreadsheetControl Class

SpreadsheetControl Members

DevExpress.Xpf.Spreadsheet Namespace