Back to Devexpress

SpreadsheetControl.SaveDocumentAs() Method

windowsforms-devexpress-dot-xtraspreadsheet-dot-spreadsheetcontrol-c158b75d.md

latest2.7 KB
Original Source

SpreadsheetControl.SaveDocumentAs() Method

Invokes the Save As dialog and saves a document.

Namespace : DevExpress.XtraSpreadsheet

Assembly : DevExpress.XtraSpreadsheet.v25.2.dll

NuGet Package : DevExpress.Win.Spreadsheet

Declaration

csharp
public virtual void SaveDocumentAs()
vb
Public Overridable Sub SaveDocumentAs

Remarks

Prompts the user for file format and location and saves the document.

The following code snippet (auto-collected from DevExpress Examples) contains a reference to the SaveDocumentAs() 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.

winforms-spreadsheet-load-and-save-a-password-encrypted-files/CS/EncryptionExample/Form1.cs#L52

csharp
workbook.DocumentSettings.Encryption.Password = barPasswordEdit.EditValue.ToString();
spreadsheetControl1.SaveDocumentAs();
#endregion #SetEncryptionTypeAndPassword

winforms-spreadsheet-load-and-save-a-password-encrypted-files/VB/EncryptionExample/Form1.vb#L53

vb
workbook.DocumentSettings.Encryption.Password = barPasswordEdit.EditValue.ToString()
            spreadsheetControl1.SaveDocumentAs()
#End Region ' #SetEncryptionTypeAndPassword

See Also

LoadDocument

How to: Save a Document to a File

SpreadsheetControl Class

SpreadsheetControl Members

DevExpress.XtraSpreadsheet Namespace