Skip to content

Exstruct

Conversion from Excel to structured JSON (tables, shapes, charts) for LLM/RAG pipelines, and autonomous Excel reading/writing by AI agents via CLI and MCP integration.

Install: git clone https://github.com/harumiWeb/exstruct

Install

$git clone https://github.com/harumiWeb/exstruct

Install command taken from the project's README or registry entry. Always review code before running it.

Excel Structured Extraction Engine

English

|

日本語

ExStruct — Excel Structured Extraction Engine

ExStruct reads Excel workbooks into structured data and applies patch-based editing workflows through a shared core. It provides extraction APIs, a JSON-first editing CLI, and an MCP server for host-managed integrations, with options tuned for LLM/RAG preprocessing, reviewable edit flows, and local automation.

  • In COM/Excel environments (Windows), it performs rich extraction.
  • In non-COM environments (Linux/macOS):
    • direct OOXML parsing extracts cells, shapes, charts, table candidates, and print areas on a best-effort basis
    • if the LibreOffice runtime is available, cells, table candidates, shapes, and charts are also extracted on a best-effort basis

Detection heuristics, editing workflows, and output modes are adjustable for LLM/RAG pipelines and local automation.

Main Features

  • Excel -> structured JSON: outputs cells, shapes, charts, SmartArt, table candidates, merged-cell ranges, print areas, and auto page-break areas by sheet or by area.
  • Output modes:
    • light: cells + table candidates + print areas + best-effort shapes/charts via direct OOXML for .xlsx / .xlsm
    • libreoffice: best-effort non-COM mode for .xlsx/.xlsm. When the LibreOffice runtime is available, it adds merged cells, shapes, connectors, and charts
    • standard: Excel COM mode with texted shapes + arrows, charts, SmartArt, and merged-cell ranges
    • verbose: outputs all shapes with width/height and also emits cell hyperlinks
  • Formula extraction: emits formulas_map (formula string -> cell coordinates) via OOXML or the selected openpyxl/COM path. It is enabled by default in verbose and can be controlled with include_formulas_map.
  • Formats: JSON (compact by default, --pretty for formatting), YAML, and TOON (optional dependencies).
  • Workbook editing interfaces: use the editing CLI for primary ExStruct edit flows, keep MCP for host-owned safety controls, and use exstruct.edit only when you need the same patch contract from Python.
  • Table detection tuning: heuristics can be adjusted dynamically through the API.
  • Hyperlink extraction: in verbose mode, or with include_cell_links=True, cell links are emitted in links.
  • Safe fallback: light uses direct OOXML for .xlsx / .xlsm without Excel COM or LibreOffice. Unsupported OOXML or colors_map requests restart the complete openpyxl compatibility pipeline with an ooxml_compatibility warning; partial results are discarded. A drawing failure isolated to one sheet remains best-effort.

Installation

pip install exstruct

Optional extras:

  • Border-clustering acceleration: pip install exstruct[fast] (SciPy). Normal direct light extraction uses Python clustering. SciPy acceleration and EXSTRUCT_BORDER_CLUSTER_BACKEND selection apply to other modes and compatibility extraction; NumPy remains a core dependency.
  • YAML: pip install pyyaml
  • TOON: pip install python-toon
  • Rendering (PDF/PNG): Excel + pip install pypdfium2 pillow (mode=libreoffice is not supported)
  • Install these extras at once: pip install exstruct[yaml,toon,render,fast]

Platform note:

  • On Debian/Ubuntu/WSL, install LibreOffice together with python3-uno. ExStruct probes a compatible system Python automatically for mode=libreoffice; if your environme

Similar plugs

The agent harness performance optimization system. Skills, instincts, memory, security, and research-first development for Claude Code, Codex, Opencode, Cursor and beyond.

Fair-code workflow automation platform with native AI capabilities. Combine visual building with custom code, self-host or cloud, 400+ integrations.

Build Agentic workflows, RAG pipelines, with rich AI model and tool support on one collaborative workspace. Deploy on cloud, VPC, or self-hosted, so teams move from prototype…

Java 面试 & 后端通用面试指南,覆盖计算机基础、数据库、分布式、高并发、系统设计与 AI 应用开发

MCP serverDatabases+105 this week

Explore related