Office Extraction

Extracts text from DOCX and PPTX documents for content analysis.

cxcscmu Updated

File contents

Office Extraction Skill

This skill provides methods for extracting text from Microsoft Office documents (.docx, .pptx).

Methods

1. Using docx2txt or pandoc

If installed, these tools can convert Office docs to text.

# For DOCX
pandoc -t plain "document.docx" -o "output.txt"

2. Using Gemini CLI docx and pptx Skills

These specialized skills provide direct tools for document manipulation.

// For DOCX
await docx.read_file({ file_path: "paper.docx" });

// For PPTX
await pptx.read_presentation({ file_path: "slides.pptx" });

3. Manual Extraction (unzip)

DOCX and PPTX are ZIP archives. You can unzip them and read the XML.

unzip -p "document.docx" word/document.xml | sed -e 's/<[^>]*>//g'

Usage Pattern

Extract the main body text or titles to identify the document's subject matter.

cxcscmu/SkillLearnBench commit 5a9e510a01

Frequently asked questions

npx get-skill add cxcscmu/office-extraction