API Reference
Unprotect-OfficeExcelWorkbook
Removes workbook structure/window protection metadata.
Remarks
Removes workbook structure/window protection metadata.
Examples
Remove workbook-level protection metadata.
PS>
Unprotect-OfficeExcelWorkbook -Path .\Report.xlsx
Test-OfficeExcelWorkbook -Path .\Report.xlsx -SkipOpenXmlValidation |
Select-Object Passed, ProtectionSummary
Removes workbook structure/window protection metadata and saves the workbook.
Common Parameters
This command supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable.
For more information, see about_CommonParameters.
Syntax
Unprotect-OfficeExcelWorkbook [-PassThru] [<CommonParameters>]#ContextParameters
- PassThru SwitchParameter
- Emit the workbook after removing protection.
Outputs
OfficeIMO.Excel.ExcelDocument, System.IO.FileInfo
Unprotect-OfficeExcelWorkbook [-PassThru] -Path <String> [<CommonParameters>]#PathParameters
- PassThru SwitchParameter
- Emit the workbook after removing protection.
- Path String
- Workbook path to update.
Outputs
OfficeIMO.Excel.ExcelDocument, System.IO.FileInfo
Unprotect-OfficeExcelWorkbook -Document <ExcelDocument> [-PassThru] [<CommonParameters>]#DocumentParameters
- Document ExcelDocument
- Workbook to update outside the DSL context.
- PassThru SwitchParameter
- Emit the workbook after removing protection.
Outputs
OfficeIMO.Excel.ExcelDocument, System.IO.FileInfo