Detect if Worksheet is Password Protected
Contents
[
Hide
]
It is possible to protect the workbooks and worksheets separately. For instance, a spreadsheet may contain one or more worksheets that are password-protected, however, the spreadsheet itself may or may not be protected. Aspose.Cells APIs provide the means to detect if a given worksheet is password protected or not. This article demonstrates the usage of Aspose.Cells for Java API to achieve the same.
Detect if Worksheet is Password Protected
Aspose.Cells for Java 8.7.0 has exposed the Protection.isProtectedWithPassword property to detect if a worksheet is password protected or not. Boolean type Protection.isProtectedWithPassword field returns true if Worksheet is password protected and false if not.