Skip to main content
Row

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

EncryptionOptions Interface

Contains the workbook encryption options.

Namespace: DevExpress.Spreadsheet

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

NuGet Package: DevExpress.Spreadsheet.Core

#Declaration

public interface EncryptionOptions

The following members return EncryptionOptions objects:

#Remarks

The EncryptionOptions class properties are used to specify the encryption type and a password for saving a workbook to a password encrypted file. An instance of this class is accessible using the SpreadsheetControl.Document.DocumentSettings.Encryption notation.

#Example

This code snippet obtains the DocumentSettings.Encryption settings selected in the editors and prompts for saving a password encrypted file.

View Example

IWorkbook workbook = spreadsheetControl1.Document;
workbook.DocumentSettings.Encryption.Type = (EncryptionType)Enum.Parse(typeof(EncryptionType), barEncryptionTypeComboBox.EditValue.ToString());
workbook.DocumentSettings.Encryption.Password = barPasswordEdit.EditValue.ToString();
spreadsheetControl1.SaveDocumentAs();
See Also