Skip to content

Instantly share code, notes, and snippets.

@geejay101
geejay101 / unprotect-xlsx.sh
Created October 26, 2024 09:48 — forked from zachselby/unprotect-xlsx.sh
Bash Script to Unprotect Sheets in Excel Workbook
#!/bin/bash
#################
# Usage: #
#################
# Create an unprotected copy of XLSX file with suffix "-unprotected.xlsx".
# The following command produces `my-workbook-unprotected.xlsx`
# $ ./unprotect-xlsx.sh my-workbook.xlsx
# This is accomplished by removing from all workbook sheets the `sheetProtection` and `protectedRanges` XML elements.