/** * Remove protection from this package. * * @throws Xlsx4jException */ public void removeWorkbookProtection() throws Xlsx4jException { WorkbookPart workbookPart = ((SpreadsheetMLPackage)this.pkg).getWorkbookPart(); if (workbookPart==null) throw new Xlsx4jException("No WorkbookPart in this pkg!"); Workbook workbook = workbookPart.getJaxbElement(); if (workbook==null) throw new Xlsx4jException("WorkbookPart not initialised with Workbook content"); workbook.setWorkbookProtection(null); } /**
if (workbookProtection==null) { workbookProtection = new CTWorkbookProtection(); workbook.setWorkbookProtection(workbookProtection);
/** * Remove protection from this package. * * @throws Xlsx4jException */ public void removeWorkbookProtection() throws Xlsx4jException { WorkbookPart workbookPart = ((SpreadsheetMLPackage)this.pkg).getWorkbookPart(); if (workbookPart==null) throw new Xlsx4jException("No WorkbookPart in this pkg!"); Workbook workbook = workbookPart.getJaxbElement(); if (workbook==null) throw new Xlsx4jException("WorkbookPart not initialised with Workbook content"); workbook.setWorkbookProtection(null); } /**
if (workbookProtection==null) { workbookProtection = new CTWorkbookProtection(); workbook.setWorkbookProtection(workbookProtection);