Version

HasOpenPassword Property

Gets the value indicating whether the Workbook has an open password and will therefore be encrypted on subsequent saves.
Syntax
'Declaration
 
Public ReadOnly Property HasOpenPassword As Boolean
public bool HasOpenPassword {get;}
Remarks

Workbook instances loaded from encrypted files or streams will cache the password used to decrypt the document and reuse it on subsequent saves. Therefore, HasOpenPassword will initially be true for Workbooks loaded from encrypted files or streams and false for all other Workbooks.

The open password can be cleared or reset by using SetOpenPassword.

Requirements

Target Platforms: Windows 10, Windows 8.1, Windows 8, Windows 7, Windows Server 2012, Windows Vista SP1 or later, Windows XP SP3, Windows Server 2008 (Server Core not supported), Windows Server 2008 R2 (Server Core supported with SP1 or later), Windows Server 2003 SP2

See Also