XLGEN
XLGEN is a structure-first framework for converting complex Excel workbooks into machine-readable structural representations for downstream analytics, quality control, knowledge-graph construction, and AI-assisted interpretation. The XLGEN code is in a public repo here: https://github.com/behnam-sharif/xlgen.
Rather than treating a workbook as a collection of independent worksheets or raw cells, XLGEN identifies meaningful tables, labels, headers, hierarchical regions, and relationships across the workbook.
This repository contains the Excel structural-processing components of the XLGEN pipeline.
Documentation
For detailed information about the architecture, pipeline stages, configuration, and outputs, see the XLGEN documentation.
For a detailed description of the structure-first approach and its application to health economic models, see the XLGEN white paper.
Start here
| Page | Audience focus |
|---|---|
| Overall approach | Tables-first pipeline, enriched knowledge graph, stage map |
| xl_ingest | COM vs openpyxl, workbook preparation |
Pipeline stages (in order)
| # | Page | One-line summary |
|---|---|---|
| 1 | xl_table | Blocking → filtering → framing: find tables |
| 2 | xl_grammar | Children (hierarchy) + core, titles, headers, row names (annotate) |
| 3 | xl_dag | Formula dependency graph on core regions |
| 4 | xl_ontology | BIM tags + QC repair/promote |
| 5 | xl_summarize | Optional LLM overall + input tables |
Conceptual flow
Tables (xl_table) → core + labels + children (xl_grammar) → dependencies (xl_dag) → semantics (xl_ontology) → enriched KG → optional LLM (xl_summarize / planned xl_structural).