.NET Framework 4.5.2+
.NET Framework 4.5.2+
.NET Standard 2.0+
A newer version of this page is available. Switch to the current version.

EncryptionOptions Interface

Contains the workbook encryption options.

Namespace: DevExpress.Spreadsheet

Assembly: DevExpress.Spreadsheet.v19.1.Core.dll


public interface EncryptionOptions


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.


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

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