Workbook.Password Property

Gets or sets the password that must be supplied to open the workbook.

Namespace:  Microsoft.Office.Tools.Excel
Assembly:  Microsoft.Office.Tools.Excel (in Microsoft.Office.Tools.Excel.dll)

Syntax

'Declaration
Property Password As String
    Get
    Set
string Password { get; set; }

Property Value

Type: System.String
The password that must be supplied to open the workbook.

Remarks

Use strong passwords that combine uppercase and lowercase letters, numbers, and symbols. Weak passwords do not mix these elements. Strong password: Y6dh!et5. Weak password: House27. Use a strong password that you can remember so that you do not have to write it down.

.NET Framework Security

See Also

Reference

Workbook Interface

Microsoft.Office.Tools.Excel Namespace