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

SpreadsheetControl.SaveDocument() Method

Saves a document to the original file location, and for a new document, the method invokes the Save As modal dialog box.

Namespace: DevExpress.Xpf.Spreadsheet

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

NuGet Package: DevExpress.Wpf.Spreadsheet

#Declaration

public virtual bool SaveDocument()

#Returns

Type Description
Boolean

true, if the document is successfully saved; otherwise, false.

#Remarks

If the document is loaded from a file, the WorkbookSaveOptions.CurrentFileName and WorkbookSaveOptions.CurrentFormat properties are set to the file name and format of the original document. The SaveDocument method saves a document as a file with the name taken from the CurrentFileName property in a format specified by the CurrentFormat property.

If the CurrentFileName property is empty or the CurrentFormat property equals the DocumentFormat.Undefined value, the SaveDocument method displays the Save As dialog box that allows users to browse folders and specify a filename and format to save the document to.

See Also