officefileapi-devexpress-dot-spreadsheet-dot-encryptedfilepasswordrequesteventargs.md
Gets or sets the password used to encrypt the document.
Namespace : DevExpress.Spreadsheet
Assembly : DevExpress.Spreadsheet.v25.2.Core.dll
NuGet Package : DevExpress.Spreadsheet.Core
public string Password { get; set; }
Public Property Password As String
| Type | Description |
|---|---|
| String |
A String value that is the encryption password.
|
The following code snippets (auto-collected from DevExpress Examples) contain references to the Password property.
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#L62
private void SpreadsheetControl1_EncryptedFilePasswordRequest(object sender, EncryptedFilePasswordRequestEventArgs e) {
if (e.DocumentName == "encrypted_test.xlsx") e.Password = "test";
if (e.DocumentName == "corrupted.xlsx") e.Password = "000";
spreadsheet-document-api-encryption/CS/EncryptionExample/Program.cs#L73
Console.WriteLine("Enter password:");
e.Password = Console.ReadLine();
e.Handled = true;
winforms-spreadsheet-load-and-save-a-password-encrypted-files/VB/EncryptionExample/Form1.vb#L63
Private Sub SpreadsheetControl1_EncryptedFilePasswordRequest(ByVal sender As Object, ByVal e As EncryptedFilePasswordRequestEventArgs)
If Equals(e.DocumentName, "encrypted_test.xlsx") Then e.Password = "test"
If Equals(e.DocumentName, "corrupted.xlsx") Then e.Password = "000"
spreadsheet-document-api-encryption/VB/EncryptionExample/Program.vb#L56
Console.WriteLine("Enter password:")
e.Password = Console.ReadLine()
e.Handled = True
See Also
EncryptedFilePasswordRequestEventArgs Class