Analyze a workbook to JSON
from excelminer import AnalysisOptions, analyze_to_dict
result = analyze_to_dict(
"workbook.xlsx",
options=AnalysisOptions(include_formulas=True),
)
print(result["graph"]["stats"])
excelminer inventories workbooks without opening Excel: sheets, connections, Power Query, pivots, formulas, and more.
from excelminer import AnalysisOptions, analyze_to_dict
result = analyze_to_dict(
"workbook.xlsx",
options=AnalysisOptions(include_formulas=True),
)
print(result["graph"]["stats"])
from excelminer import AnalysisOptions, analyze_workbook
graph, reports, ctx = analyze_workbook(
"workbook.xlsx",
options=AnalysisOptions(include_formulas=True),
)
print(graph.stats())
print(ctx.issues)
The pipeline is designed for inventory, reproducible diffs, and analysis. Formulas are captured as text, macros are never executed.
The default backend order can be overridden, but this is the typical flow.
Tip: Write the bundled site files to a folder and open index.html locally:
python -m excelminer.docs --write-site .\excelminer-site
Then open excelminer-site\index.html in your browser.
Every analysis returns a deterministic graph.
{
"id": "sheet:Sheet1",
"kind": "sheet",
"key": "Sheet1",
"attrs": {"index": 0}
}{
"src": "sheet:Sheet1",
"dst": "formula_cell:Sheet1!A1",
"kind": "contains",
"attrs": {}
}Learn about architecture decisions, backend responsibilities, and data flow.
Understand connection sanitization, Power Query privacy risks, and COM automation constraints.