[!NOTE] While use of LLMs for generating code is encouraged, LLM-generated prose is severely restricted. See the LLM policy for more details.
visi is a CLI application for editing and evaluating Excel spreadsheets.
visi even produces more numerically accurate resultsvisi aims to match the classes of errors that Excel produces, but not the error message itself (visi may be able to improve upon Excel here)visiLLMs are good at authoring spreadsheets with existing tools
(such as openpyxl for Python), but in order
to evaluate the formula results, you need a real
spreadsheet application. Excel is
unsuitable for headless evaluation of
spreadsheet files, especially on non-Windows
platforms (e.g. no COM automation).
visi aims to bridge this gap by providing an
execution/verification layer for spreadsheets.
brew install albert-yu/tap/visi
# Display summary of sheets, dimensions, and formula counts
visi info data.xlsx
# Output summary as JSON
visi info data.xlsx --json
# View first sheet as a formatted ASCII table in the terminal
visi read data.xlsx
# View specific sheet and range
visi read data.xlsx --sheet Sheet1 --range A1:C10
# Read a single cell result or raw formula
visi read data.xlsx --cell A1
visi read data.xlsx --cell A3 --raw
visi read data.xlsx --format csv
visi read data.xlsx --format json
You can take a spreadsheet authored with openpyxl and
perform the computation with eval.
# --in-place or -i will write back to the input file
visi eval data.xlsx --in-place
# Recalculate and print to stdout,
# leaving the original workbook unmodified
visi eval data.xlsx --print --format table
visi set data.xlsx --sheet Sheet1 --cell A1 --value 100 --output updated.xlsx
# Set multiple cell values and formulas at once
visi set data.xlsx -s Sheet1 -S A1=100 -S A2=200 -S A3="=A1+A2" -S A4="=AVERAGE(A1:A2)" -i
# Cross-sheet reference
visi set data.xlsx -s Sheet2 -S B1="=Sheet1!A3 + 50" -i
visi sheet list data.xlsx
visi sheet add data.xlsx --name "Summary" -i
visi sheet rename data.xlsx --old "Sheet1" --new "Data" -i
visi sheet delete data.xlsx --name "OldSheet" -i
Use --index for a 0-based offset or --label
if you want to follow the UI labels.
# Insert a new row at start
visi row delete data.xlsx --sheet Sheet1 --label 1 -i
visi row insert data.xlsx --sheet Sheet1 --index 0 -i
# Delete column label 'C'
visi col delete data.xlsx --sheet Sheet1 --label C -i
visi col delete data.xlsx --sheet Sheet1 --index 2 -i
visi export data.xlsx --sheet Sheet1 --format csv --output sheet1.csv
visi export data.xlsx --sheet Sheet1 --format json --output sheet1.json
This monorepo is structured follows:
visi-core: embeddable spreadsheet engine that parses and executes the formulas in the workbookvisi: Command-line application using visi-core which can edit and execute Excel files headlesslyvisi aims for feature parity with Excel by using
a harness that drives a real copy of Excel via AppleScript or COM automation,
runs computations, and compares the results. Both the cell values and types
should match exactly. See fuzz for more details.
Dual-licensed:
Rust
84.3%
Python
15.2%
[!NOTE] While use of LLMs for generating code is encouraged, LLM-generated prose is severely restricted. See the LLM policy for more details.
visi is a CLI application for editing and evaluating Excel spreadsheets.
visi even produces more numerically accurate resultsvisi aims to match the classes of errors that Excel produces, but not the error message itself (visi may be able to improve upon Excel here)visiLLMs are good at authoring spreadsheets with existing tools
(such as openpyxl for Python), but in order
to evaluate the formula results, you need a real
spreadsheet application. Excel is
unsuitable for headless evaluation of
spreadsheet files, especially on non-Windows
platforms (e.g. no COM automation).
visi aims to bridge this gap by providing an
execution/verification layer for spreadsheets.
brew install albert-yu/tap/visi
# Display summary of sheets, dimensions, and formula counts
visi info data.xlsx
# Output summary as JSON
visi info data.xlsx --json
# View first sheet as a formatted ASCII table in the terminal
visi read data.xlsx
# View specific sheet and range
visi read data.xlsx --sheet Sheet1 --range A1:C10
# Read a single cell result or raw formula
visi read data.xlsx --cell A1
visi read data.xlsx --cell A3 --raw
visi read data.xlsx --format csv
visi read data.xlsx --format json
You can take a spreadsheet authored with openpyxl and
perform the computation with eval.
# --in-place or -i will write back to the input file
visi eval data.xlsx --in-place
# Recalculate and print to stdout,
# leaving the original workbook unmodified
visi eval data.xlsx --print --format table
visi set data.xlsx --sheet Sheet1 --cell A1 --value 100 --output updated.xlsx
# Set multiple cell values and formulas at once
visi set data.xlsx -s Sheet1 -S A1=100 -S A2=200 -S A3="=A1+A2" -S A4="=AVERAGE(A1:A2)" -i
# Cross-sheet reference
visi set data.xlsx -s Sheet2 -S B1="=Sheet1!A3 + 50" -i
visi sheet list data.xlsx
visi sheet add data.xlsx --name "Summary" -i
visi sheet rename data.xlsx --old "Sheet1" --new "Data" -i
visi sheet delete data.xlsx --name "OldSheet" -i
Use --index for a 0-based offset or --label
if you want to follow the UI labels.
# Insert a new row at start
visi row delete data.xlsx --sheet Sheet1 --label 1 -i
visi row insert data.xlsx --sheet Sheet1 --index 0 -i
# Delete column label 'C'
visi col delete data.xlsx --sheet Sheet1 --label C -i
visi col delete data.xlsx --sheet Sheet1 --index 2 -i
visi export data.xlsx --sheet Sheet1 --format csv --output sheet1.csv
visi export data.xlsx --sheet Sheet1 --format json --output sheet1.json
This monorepo is structured follows:
visi-core: embeddable spreadsheet engine that parses and executes the formulas in the workbookvisi: Command-line application using visi-core which can edit and execute Excel files headlesslyvisi aims for feature parity with Excel by using
a harness that drives a real copy of Excel via AppleScript or COM automation,
runs computations, and compares the results. Both the cell values and types
should match exactly. See fuzz for more details.
Dual-licensed:
Rust
84.3%
Python
15.2%