office_read
Read content from Word, Excel, or PowerPoint documents, auto-detecting format from file extension, and output as JSON or markdown with optional scope for Excel ranges.
Instructions
Read content from Word, Excel, or PowerPoint documents.
Auto-detects document format from file extension and extracts content in the requested output format.
Replaces: word_extract, word_to_markdown, excel_extract, excel_to_markdown, excel_get_range, pptx_extract, pptx_to_markdown
Examples: # Read entire Excel file as JSON office_read(file_path="data.xlsx")
# Read Excel file as markdown
office_read(file_path="data.xlsx", output_format="markdown")
# Read specific range from Excel
office_read(file_path="data.xlsx", scope="Sheet1!A1:D10")
# Read a single worksheet
office_read(file_path="data.xlsx", scope="Sheet1")
# Read Word document as markdown
office_read(file_path="report.docx", output_format="markdown")
# Read PowerPoint as JSON
office_read(file_path="deck.pptx")Args: file_path: Path to the document (.docx, .xlsx, .xlsm, .pptx) output_format: Output format - "json" for structured data, "markdown" for text representation scope: Optional scope limiter: - Excel: sheet name like "Sheet1" or range like "A1:D10" or "Sheet1!B2:C5" - Word: section title (not yet implemented) - PowerPoint: slide number like "slide:3" (not yet implemented) include_formulas: For Excel, return formulas instead of values
Returns: dict for JSON format, str for markdown format
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| file_path | Yes | Path to the document (.docx, .xlsx, .xlsm, .pptx) | |
| output_format | No | Output format - "json" for structured data, "markdown" for text representation | |
| scope | No | Optional scope limiter | |
| include_formulas | No | For Excel, return formulas instead of values |