It makes a new copy of Excel to fix any bad metadata Removes Protections from Word Editing Passwords
Go to file
2025-02-13 14:44:55 -08:00
src refactor: Improve sheet view settings copying with granular property handling 2025-02-13 14:44:55 -08:00
.gitignore chore: Update .gitignore with comprehensive Python and development ignores 2025-02-11 10:19:50 -08:00
README.md docs: Add comprehensive README.md for Office Protection Remover project 2025-02-11 15:42:37 -08:00
requirements.txt build: Add tk package to requirements.txt 2025-02-11 16:09:23 -08:00

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:
git clone [repository-url]
cd office-protection-remover
  1. Create a virtual environment:
# Windows
python -m venv venv
.\venv\Scripts\activate

# macOS/Linux
python3 -m venv venv
source venv/bin/activate
  1. Install required packages:
pip install -r requirements.txt

Usage

  1. Start the Streamlit app:
streamlit run src/streamlit_app.py
  1. Open your web browser and navigate to the displayed URL (typically http://localhost:8501)

  2. 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:

  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

    # 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]