Skip to main content

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

PageAudience focus
Overall approachTables-first pipeline, enriched knowledge graph, stage map
xl_ingestCOM vs openpyxl, workbook preparation

Pipeline stages (in order)

#PageOne-line summary
1xl_tableBlocking → filtering → framing: find tables
2xl_grammarChildren (hierarchy) + core, titles, headers, row names (annotate)
3xl_dagFormula dependency graph on core regions
4xl_ontologyBIM tags + QC repair/promote
5xl_summarizeOptional 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).