Office Doc Suite: Word/Excel/PDF Toolkit
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 atreplacewith fidelity—modifying placeholder text (e.g.,【姓名】) while strictly preserving original fonts, paragraphs, and styles. Thereplace-batchcommand handles multiple find-replace pairs in one go. - Excel (
.xlsx) Handling: Goes beyond simple reading. Themergecommand intelligently combines multiple spreadsheets while automatically deduplicating headers.statsandreportprovide 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).splitsupports flexible page ranges (e.g.,1-3,5), whileprotectanddecryptmanage security, with AES decryption requiring thepycryptodomelibrary.
Key Operational Workflow
- Environment Check: Run
python scripts/setup_check.py checkto verify that dependencies (python-docx,openpyxl,PyPDF2, etc.) are installed. - Legacy Format Conversion: For
.xlsor.docfiles, first useconvert_legacy.py. Converting.xlsto.xlsxrequires thexlrdlibrary; converting.docto.docxrequires LibreOffice installed locally. - 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-oflag 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.
Related Skills
Batch-import team weekly reports, aggregate progress, plans, issues, and support by project, flag delivery or resource risks, and generate structured department reports.
Generates Kingdee Cloud ERP startup, implementation, and acceptance documents from Word templates with delivery guidance.
Read PDF, Word, Excel, PowerPoint, HTML, and text documents, list archive files, and extract text or JSON for AI analysis.
Extract decisions and action items from meeting notes, emails, or chat logs, then track owners, deadlines, and follow-ups with lightweight reminders and no direct tool integrations.