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.v21.2.dll


public virtual bool SaveDocument()


Type Description

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


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