public void TestWriteProtection() { HSSFWorkbook wb = new HSSFWorkbook(); Assert.IsFalse(wb.IsWriteProtected); wb.WriteProtectWorkbook("mypassword", "myuser"); Assert.IsTrue(wb.IsWriteProtected); wb.UnwriteProtectWorkbook(); Assert.IsFalse(wb.IsWriteProtected); }