AI Agent Hub
Back to skills
Office Doc Suite: Word/Excel/PDF Toolkit icon

Office Doc Suite: Word/Excel/PDF Toolkit

Office Efficiency Updated 2026.08.30

Paste the following prompt into your AI chat to install this skill:

Please install @user_69794d19/office-doc-suite by following the guide at https://skillhub.cn/install/skillhub.md.

About this skill

The Core Problem in Document Workflows

Daily office tasks involving .docx, .xlsx, and .pdf files often involve friction: formatting gets corrupted during sharing, manually processing multiple files is tedious and error-prone, uploading sensitive files to the cloud raises privacy concerns, and legacy formats like .xls or .doc present compatibility hurdles.

How the Office Doc Suite Works

This is a local Python toolkit designed to address these pain points with focused solutions.

Core Processing Capabilities

  • Word (.docx) Handling: Beyond basic creation, it excels at replace with fidelity—modifying placeholder text (e.g., 【姓名】) while strictly preserving original fonts, paragraphs, and styles. The replace-batch command handles multiple find-replace pairs in one go.
  • Excel (.xlsx) Handling: Goes beyond simple reading. The merge command intelligently combines multiple spreadsheets while automatically deduplicating headers. stats and report provide quick column-based summarization (sum, average, etc.) to generate summary reports with totals.
  • PDF Operations: Covers the full workflow from merging and splitting to text extraction and image conversion (requires pymupdf). split supports flexible page ranges (e.g., 1-3,5), while protect and decrypt manage security, with AES decryption requiring the pycryptodome library.

Key Operational Workflow

  1. Environment Check: Run python scripts/setup_check.py check to verify that dependencies (python-docx, openpyxl, PyPDF2, etc.) are installed.
  2. Legacy Format Conversion: For .xls or .doc files, first use convert_legacy.py. Converting .xls to .xlsx requires the xlrd library; converting .doc to .docx requires LibreOffice installed locally.
  3. Execution & Verification: Call the specific script based on your task (e.g., docx_tool.py, xlsx_tool.py, pdf_tool.py). All commands require an -o flag to specify a new output file, ensuring the original is never overwritten. After execution, it's good practice to verify the output file's content and size.

**Scope of Use and Important Considerations

This suite is positioned as a lightweight, local processing tool, excelling at structured data and standard-form documents, but it is not a full-featured office application:
- It is not designed for: Documents with complex layouts (artistic text, professional charts), macro code, or extracting text from scanned PDFs (which requires prior OCR).
- Core Principles: Local execution, fidelity, and non-destructive operation. All processing happens on your machine with no data uploads.
- Clear Guidance: For legacy .doc files, the script will guide you to use WPS/Word to "Save As" .docx. For errors, the scripts provide Chinese-language explanations of the cause and suggested fixes.

Use Cases

  • At month-end, needing to consolidate monthly data sheets from Sales, Finance, and HR departments into a single summary table with automatically calculated sales totals.
  • Each week, needing to process a Word meeting minutes template by replacing placeholders like【Attendees】and【Date】with actual information while preserving the original formatting.
  • Receiving a 50-page contract PDF and needing to extract pages 3-5 (the supplementary agreement) as a separate document, then add page numbers to the entire PDF.
  • Being sent sales data in the legacy .xls format, and needing to convert it to modern .xlsx before data analysis and pivot table creation can be performed.

Best For

  • Administrative or Operations Staff: Responsible for regularly merging Excel data reports submitted by multiple departments into a summary report.
  • Project Managers or Executive Assistants: Need to frequently and quickly generate well-formatted Word documents like weekly reports or meeting minutes from templates.
  • Legal or Contract Management Professionals: Handle numerous PDF contract files, requiring splitting, merging, encryption, or information extraction.
  • Financial or Data Analysis Roles: Receive data files from external partners in legacy formats that must be converted before processing and analysis.