Skip to main content

CLI tool for exploring Excel workbooks — trace formulas, understand model structure, read data

Project description

Excel Explorer

CLI tool for exploring Excel workbooks. Trace formula dependencies, understand model structure, read data with pagination. Designed for use by Claude Code agents.

Install

# As a standalone CLI tool (recommended)
uv tool install excel-explorer

# Or with pip
pip install excel-explorer

# Or run without installing
uvx --from excel-explorer xlx overview "file.xlsx"

This installs the xlx command.

Development setup

git clone https://github.com/pressw-llc/excel-explorer.git
cd excel-explorer
uv sync --group dev
uv run pytest

Usage

Every command takes a workbook path as its first argument. Paths with spaces should be quoted.

Orientation

Get a high-level view of a workbook before diving into details.

# Workbook overview: sheets, dimensions, formula counts, named ranges
xlx overview "Financials.xlsx"

# Describe a single sheet: headers, merged cells, data regions
xlx describe "Financials.xlsx" "Balance Sheet"

# List all named ranges and their targets
xlx named-ranges "Financials.xlsx"

Reading

Read cell values and structured data from sheets.

# Read a range (values only)
xlx read "Financials.xlsx" "Income Statement" A1:D20

# Read a range showing formulas alongside computed values
xlx read --formulas "Financials.xlsx" "Income Statement" A1:D20

# Read a full row with auto-detected headers
xlx read-row "Financials.xlsx" "Income Statement" 5

# Read a full column
xlx read-col "Financials.xlsx" "Income Statement" B

# Auto-detect contiguous table regions on a sheet
xlx tables "Financials.xlsx" "Income Statement"

Dependencies

Understand how cells relate to each other and trace formula chains.

# Trace a cell's dependency tree down to leaf inputs
xlx trace "Financials.xlsx" "Income Statement!B10"
xlx trace "Financials.xlsx" B10 --sheet "Income Statement"

# Find all cells that depend on a given cell (reverse trace)
xlx dependents "Financials.xlsx" "Assumptions!C5"

# Show unique formula patterns on a sheet, grouped by structure
xlx formula-map "Financials.xlsx" "Income Statement"

# Find hardcoded cells that other cells depend on (model inputs/assumptions)
xlx find-inputs "Financials.xlsx"
xlx find-inputs "Financials.xlsx" --sheet "Assumptions"

# Map which sheets reference which other sheets
xlx sheet-flow "Financials.xlsx"

Financial Analysis

Higher-level commands built for financial models.

# Find and summarize assumption sheets and named ranges
xlx summarize-assumptions "Financials.xlsx"

# Read a time-series row and compute period-over-period changes
xlx compare-periods "Financials.xlsx" "Income Statement" 10

# Detect formula pattern breaks (hardcoded values in formula rows, etc.)
xlx find-anomalies "Financials.xlsx" "Income Statement"

# Check that Assets = Liabilities + Equity across all period columns
xlx validate-balance "Financials.xlsx" "Balance Sheet"

Search

Search across the entire workbook.

# Search all cells for a value or text pattern
xlx search "Financials.xlsx" "revenue"

# Also search inside formula strings
xlx search --formulas "Financials.xlsx" "VLOOKUP"

# Report cells with notable formatting: bold, fill colors, borders
xlx find-formatting "Financials.xlsx" "Income Statement"

Pagination

Large workbooks can return a lot of data. Use these flags to page through results without overwhelming the context window.

Flag Default Description
--limit N 50 Maximum number of rows (or items) to return
--offset N 0 Skip the first N rows before returning results
--max-cols N 20 Maximum number of columns to show
--col-offset N 0 Skip the first N columns before returning results
--depth N 5 Maximum recursion depth for trace and dependents

Example — page through a large sheet in chunks of 100 rows (use a bounded row range; column-only ranges like A:Z are returned column-major and don't paginate by row):

xlx read "Financials.xlsx" "Transactions" A1:Z1000 --limit 100 --offset 0
xlx read "Financials.xlsx" "Transactions" A1:Z1000 --limit 100 --offset 100
xlx read "Financials.xlsx" "Transactions" A1:Z1000 --limit 100 --offset 200

Output Format

Every command outputs a metadata header followed by --- and then the body. The header uses a YAML-style key: value format describing what was returned so agents can make pagination decisions without re-reading. For example, xlx read:

file: financial_model.xlsx
sheet: P&L
range: A1:C5
showing: rows 1-5 of 5
truncated: false
---
  A1: Profit & Loss Statement
  A3: Line Item
  A4: Gross Revenue
  B4: ='Revenue Build'!B8
  C4: ='Revenue Build'!C8
  ...

The exact header keys vary by command (range, row, column, query, matches, ...). The pagination-relevant ones:

  • showing: rows X-Y of Z — current window and total rows available
  • truncated: true — results were cut off; advance --offset or increase --limit
  • shown / offset / limit — pagination position on search-style commands

Commands that return summaries rather than rows (overview, named-ranges, sheet-flow, validate-balance, trace, dependents) don't paginate and omit these fields.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

excel_explorer-0.1.0.tar.gz (18.7 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

excel_explorer-0.1.0-py3-none-any.whl (22.0 kB view details)

Uploaded Python 3

File details

Details for the file excel_explorer-0.1.0.tar.gz.

File metadata

  • Download URL: excel_explorer-0.1.0.tar.gz
  • Upload date:
  • Size: 18.7 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.13

File hashes

Hashes for excel_explorer-0.1.0.tar.gz
Algorithm Hash digest
SHA256 401915a6363257f359fd33846bea0d9e71552b4a04f297f2c1dc884598fb4e6d
MD5 3c6599fca14537ccc4fbdc9fe57f1fea
BLAKE2b-256 f0242ae39ca1a451f73301f9e3d8b73737aba2d17b9e4eee8a913951fe9da1bb

See more details on using hashes here.

Provenance

The following attestation bundles were made for excel_explorer-0.1.0.tar.gz:

Publisher: release.yml on pressw-llc/excel-explorer

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file excel_explorer-0.1.0-py3-none-any.whl.

File metadata

  • Download URL: excel_explorer-0.1.0-py3-none-any.whl
  • Upload date:
  • Size: 22.0 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.13

File hashes

Hashes for excel_explorer-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 7d3f23a3d8793bab29b5eb831aa4ef59944b05dc9549c13eb7b35dc366357cd8
MD5 8e17d2ffe116cc1a97e1d661c104261f
BLAKE2b-256 23cb4b64038d127fe8b1cc5cff875c782e813d6baefe76f53f8739f46900cb1a

See more details on using hashes here.

Provenance

The following attestation bundles were made for excel_explorer-0.1.0-py3-none-any.whl:

Publisher: release.yml on pressw-llc/excel-explorer

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page