Community程式設計與開發github.com

claude-office-skills/doc-parser

解析並提取 Office 文檔(如 Word、Excel、PowerPoint)中的文字與結構化內容,方便 AI 代理進行後續處理。

doc-parser 是什麼?

claude-office-skills/doc-parser 是一個專為 AI 代理(如 Claude Code、Cursor)設計的技能,能夠解析 Microsoft Office 格式的文檔(包括 .docx、.xlsx、.pptx),並將其轉換為結構化的文字或 JSON 輸出。此技能對於需要從報告、簡報或試算表中提取資料進行分析、摘要或整合的開發者與知識工作者非常實用。它支援跨平台操作,可與常用開發工具整合,透過讀取檔案內容並轉譯為機器可讀取的格式,簡化了文件處理流程,提升自動化工作流程的效率。

相容平台✓Claude Code~Codex CLI~Cursor
npx skills add https://github.com/claude-office-skills/skills/tree/main/skills/doc-parser

Installed? Explore more 程式設計與開發 skills: steipete/bluebubbles, steipete/eightctl, steipete/blucli · View all 6 →

在你喜歡的 AI 中提問

開啟一個已預先載入此 Agent Skill 的新對話。

說明文件

doc-parser 是做什麼的?

解析 Office 文檔並提取結構化內容,供 AI 代理使用。

概述

claude-office-skills/doc-parser 是一個專門解析 Microsoft Office 文檔(Word、Excel、PowerPoint)的技能。它能將文件中的文字、表格、投影片內容提取出來,轉換為結構化資料,方便後續由 AI 代理進行分析、摘要或轉換。

支援格式

  • Word 文檔 (.docx)
  • Excel 試算表 (.xlsx)
  • PowerPoint 簡報 (.pptx)

使用方式

安裝

確保您的專案中包含必要的相依套件。通常透過 pip 安裝 python-docx、openpyxl、python-pptx 等函式庫。

pip install python-docx openpyxl python-pptx

範例:解析 Word 文檔

from doc_parser import parse_word

document = parse_word("path/to/document.docx")
print(document.text)  # 輸出純文字

範例:解析 Excel 試算表

from doc_parser import parse_excel

data = parse_excel("path/to/spreadsheet.xlsx")
print(data.sheets[0].rows[0])  # 輸出第一張工作表的首行資料

範例:解析 PowerPoint 簡報

from doc_parser import parse_powerpoint

presentation = parse_powerpoint("path/to/presentation.pptx")
for slide in presentation.slides:
    print(slide.title)
    for shape in slide.shapes:
        if shape.has_text:
            print(shape.text)

輸出格式

輸出預設為結構化的 JSON 或 Python 物件,包含:

  • 文字內容:文檔中的主要文字
  • 表格資料:表格內的結構化行與列
  • 中繼資料:如作者、建立日期、修改日期(依格式支援)

注意事項

  • 僅支援 Office Open XML 格式(.docx, .xlsx, .pptx),不支援舊版 .doc 或 .xls 格式。
  • 圖片、圖表等非文字元素不會被解析,僅提取其替代文字(如有)。
  • 大型檔案可能需要較長處理時間,建議適當分割或設定逾時。

貢獻

歡迎提交 Issue 或 Pull Request 來改善此技能。請確保遵循現有的程式碼風格與測試規範。

Individual skills in this repo

This repo contains 20 individual skills — each has its own dedicated page.

claude-office-skills/academic-search

Search and analyze academic literature. Find papers, understand research methodologies, and synthesize academic findings for research projects.

claude-office-skills/ads-copywriter

Multi-platform ad copy generation for Google Ads, Meta/Facebook, TikTok, LinkedIn with A/B testing variants

claude-office-skills/ai-agent-builder

Build AI agents with tools, memory, and multi-step reasoning - ChatGPT, Claude, Gemini integration patterns

claude-office-skills/airtable-automation

Airtable database automation - views, automations, integrations, and workflow triggers

claude-office-skills/ai-slides

Generate complete presentations with AI - from outline to polished slides

claude-office-skills/amazon-seller

Automate Amazon seller operations including inventory, orders, pricing, and advertising management

claude-office-skills/apple-shortcuts-integration

Create and trigger Apple Shortcuts for iOS/macOS automation and cross-platform workflows

claude-office-skills/applicant-screening

Screen job applications against requirements and score candidates

claude-office-skills/asana-automation

Automate Asana project management workflows, task tracking, team collaboration, and reporting

claude-office-skills/batch-convert

Batch convert documents between multiple formats using a unified pipeline

claude-office-skills/batch-processor

Process multiple documents in bulk with parallel execution

claude-office-skills/brand-guidelines-generator

Create and maintain brand style guides for consistent visual identity

claude-office-skills/browser-automation

Automate web browser interactions, scraping, testing, and workflow automation with Puppeteer/Playwright

claude-office-skills/calendar-automation

Google Calendar and Outlook automation - scheduling optimization, meeting workflows, time blocking, and Slack/Sheets integration

claude-office-skills/changelog-generator

Generate release notes from git commits, updates, or feature lists

claude-office-skills/chart-designer

Design effective data visualizations and charts. Generate chart configurations for ECharts, Chart.js, and other libraries. Create dashboards and reports.

claude-office-skills/chat-with-pdf

Answer questions about PDF content, summarize, and extract information

claude-office-skills/clickup-automation

Automate ClickUp workspace management, task workflows, time tracking, and team productivity

claude-office-skills/company-research

Conduct comprehensive company research and due diligence. Analyze business model, competitive landscape, management, and market position.

claude-office-skills/competitive-analysis

Analyze competitors systematically. Compare products, features, pricing, positioning, and market strategies. Generate comprehensive competitive intelligence reports.

相關技能