It makes a new copy of Excel to fix any bad metadata
Removes Protections from Word Editing Passwords
| src | ||
| .gitignore | ||
| README.md | ||
| requirements.txt | ||
Office Protection Remover
A Python tool to remove protection from Microsoft Office files (Excel and Word) with both command-line and Streamlit web interfaces.
Features
- Remove protection from Excel files (.xlsx, .xlsm)
- Remove protection from Word documents (.docx, .docm)
- Support for password-protected Excel files
- Batch processing via directory selection
- Web interface using Streamlit
- Command-line interface for local processing
Installation
Prerequisites
- Python 3.7 or higher
- Windows, macOS, or Linux operating system
Setup Steps
- Clone the repository:
git clone [repository-url]
cd office-protection-remover
- Create a virtual environment:
# Windows
python -m venv venv
.\venv\Scripts\activate
# macOS/Linux
python3 -m venv venv
source venv/bin/activate
- Install required packages:
pip install -r requirements.txt
Usage
Web Interface (Recommended)
- Start the Streamlit app:
streamlit run src/streamlit_app.py
-
Open your web browser and navigate to the displayed URL (typically http://localhost:8501)
-
Choose your processing options:
- Select file type (Excel or Word)
- Choose input method (Upload Files or Select Directory)
- For Excel files, set password options if needed
- Process files and download results
Command Line Interface
Run the main script directly:
python src/main.py
Follow the interactive prompts to:
- Choose file type (Excel or Word)
- Specify source directory
- Specify destination directory
- Set password options for Excel files (if applicable)
File Support
Excel Files
- .xlsx (Excel Workbook)
- .xlsm (Excel Macro-Enabled Workbook)
- Supports password-protected files
Word Files
- .docx (Word Document)
- .docm (Word Macro-Enabled Document)
Password Options (Excel)
Three options for handling password-protected Excel files:
- No Password - For unprotected files
- Single Password - Enter one password
- Password File - Upload a text file with multiple passwords (one per line)
Size Limits (Web Interface)
- Individual files: up to 200MB
- Total upload size: up to 800MB per session
- For larger files, use the directory selection option
Security Note
- No files are stored on the server
- All processing happens locally
- Passwords are only used for decryption and not stored
Troubleshooting
Common Issues
-
tkinter not found
# Windows pip install tk # Linux (Ubuntu/Debian) sudo apt-get install python3-tk # macOS brew install python-tk -
Permission Errors
- Ensure you have write permissions in the destination directory
- Run with appropriate privileges
-
Memory Issues
- Process large files using the directory selection method
- Close other memory-intensive applications
Error Logs
- Check the error log section in the web interface
- Console output for command-line usage
- Logs include detailed error messages for troubleshooting
License
[Your License Here]
Contributing
- Fork the repository
- Create a feature branch
- Commit your changes
- Push to the branch
- Create a Pull Request
Support
- Open an issue for bug reports
- Submit feature requests through issues
- Contact [your contact information]