Office Document Extractor
/install office-doc-extractor
Office Document Extractor
Zero-dependency converter for Microsoft Office documents. Extracts text and structure from DOCX, XLSX, and PPTX files into clean Markdown.
Quick Start
# Single file
python3 scripts/main.py report.docx -o report.md
# Batch convert a directory
python3 scripts/main.py ./documents --batch -o ./markdown
Supported Formats
| Format | Extension | Output |
|---|---|---|
| Word | .docx | Headings, paragraphs |
| Excel | .xlsx | Tables (one per sheet) |
| PowerPoint | .pptx | Slides as sections |
How It Works
- DOCX: Parses the ZIP archive's XML directly using Python's
zipfileandxml.etree - XLSX: Uses bundled
openpyxl(pure Python, no C extensions) - PPTX: Parses the ZIP archive's slide XML directly
No external commands, no network calls, no pip install required.
Usage
Single File
python3 scripts/main.py \x3Cinput_file> [-o \x3Coutput.md>]
Auto-detects format from file extension. If -o is omitted, outputs to \x3Cinput>.md.
Batch Conversion
python3 scripts/main.py \x3Cinput_directory> --batch [-o \x3Coutput_directory>]
Converts all .docx, .xlsx, .pptx files in the directory. Results saved to markdown_output/ by default.
Resources
scripts/
- main.py — Unified CLI for single-file and batch conversion
- docx_extractor.py — DOCX → Markdown (standard library only)
- xlsx_extractor.py — XLSX → Markdown tables (bundled openpyxl)
- pptx_extractor.py — PPTX → Markdown (standard library only)
Bundled Dependencies
- openpyxl/ — Pure Python Excel library (v3.1.5)
- et_xmlfile/ — openpyxl dependency (pure Python)
Limitations
- Does not extract images or embedded objects (text only)
- Does not preserve complex formatting (colors, fonts, layouts)
- Does not handle encrypted/password-protected files
- No OCR for scanned documents (use OpenClaw's native
pdftool for that)
Why This Skill?
Existing markitdown-based skills require pip install or external CLI tools, which triggers ClawHub security warnings. This skill is 100% self-contained — install it and use it immediately, even offline.
- 确保已安装 OpenClaw(本地或 Docker 部署)
- 在对话框中输入安装命令:
/install office-doc-extractor - 安装完成后,直接呼叫该 Skill 的名称或使用
/office-doc-extractor触发 - 根据 Skill 的参数说明提供必要输入,即可获得结构化输出
Office Document Extractor 是什么?
Convert Microsoft Office documents (DOCX, XLSX, PPTX) to Markdown without any external dependencies. Use when the user needs to extract text from Word docume... 它是一个面向 Claude Code / OpenClaw 的 AI Agent Skill 插件,目前累计下载 79 次。
如何安装 Office Document Extractor?
在 OpenClaw 或 Claude Code 对话框中运行命令「/install office-doc-extractor」即可一键安装,无需额外配置。
Office Document Extractor 是免费的吗?
是的,Office Document Extractor 完全免费,采用 MIT-0 许可证,可自由下载、安装和使用。
Office Document Extractor 支持哪些平台?
Office Document Extractor 跨平台运行,可在任意部署了 OpenClaw / Claude Code 的环境中使用(cross-platform)。
谁开发了 Office Document Extractor?
由 michealxie001(@michealxie001)开发并维护,当前版本 v1.0.1。