# 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 1. Clone the repository: ```bash git clone [repository-url] cd office-protection-remover ``` 2. Create a virtual environment: ```bash # Windows python -m venv venv .\venv\Scripts\activate # macOS/Linux python3 -m venv venv source venv/bin/activate ``` 3. Install required packages: ```bash pip install -r requirements.txt ``` ## Usage ### Web Interface (Recommended) 1. Start the Streamlit app: ```bash streamlit run src/streamlit_app.py ``` 2. Open your web browser and navigate to the displayed URL (typically http://localhost:8501) 3. 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: ```bash python src/main.py ``` Follow the interactive prompts to: 1. Choose file type (Excel or Word) 2. Specify source directory 3. Specify destination directory 4. 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: 1. No Password - For unprotected files 2. Single Password - Enter one password 3. 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 1. **tkinter not found** ```bash # Windows pip install tk # Linux (Ubuntu/Debian) sudo apt-get install python3-tk # macOS brew install python-tk ``` 2. **Permission Errors** - Ensure you have write permissions in the destination directory - Run with appropriate privileges 3. **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 1. Fork the repository 2. Create a feature branch 3. Commit your changes 4. Push to the branch 5. Create a Pull Request ## Support - Open an issue for bug reports - Submit feature requests through issues - Contact [your contact information]