xleak is a command-line tool designed to view and interact with Excel spreadsheets directly from your terminal. Built with Rust, it offers a feature-rich experience through an interactive text-based interface (TUI), enabling users to work with Excel files without needing Microsoft Excel.
Key Features:
Multi-sheet navigation: Seamlessly switch between sheets using Tab/Shift+Tab.
Full-text search: Quickly find content across all cells with the / shortcut, and navigate results with n/N.
Clipboard support: Copy cell contents (c) or entire rows (C) to your clipboard for easy sharing.
Formula display: View Excel formulas in a dedicated detail view (Enter key).
File format compatibility: Supports .xlsx, .xls, .xlsm, .xlsb, and .ods files.
Audience & Benefit:
Ideal for professionals, analysts, and developers who work with spreadsheets but prefer the efficiency of terminal-based tools. xleak empowers users to quickly access, analyze, and export data without leaving their command line or workflow. Its lazy loading feature ensures smooth performance even with large files, while its TUI interface provides an intuitive way to navigate and interact with spreadsheet content.
Installation is straightforward via winget on Windows or other package managers across platforms.
README
xleak
> Expose Excel files in your terminal - no Microsoft Excel required!
Inspired by doxx, xleak brings Excel spreadsheets to your command line with beautiful rendering, powerful export capabilities, and a feature-rich interactive TUI.
Features
Core Functionality
Beautiful terminal rendering with formatted tables
Interactive TUI mode - full keyboard navigation with ratatui
Smart data type handling - numbers right-aligned, text left-aligned, booleans centered
Multi-sheet support - seamlessly navigate between sheets (Tab/Shift+Tab)
Excel Table support - list and extract named tables (.xlsx only)
Multiple export formats - CSV, JSON, plain text
Blazing fast - powered by calamine, the fastest Excel parser in Rust
Download platform-specific binaries from the latest release:
macOS: Universal binary (Apple Silicon + Intel)
Linux: x86_64 (glibc and musl)
Windows: x86_64 MSI installer or standalone .exe
Build from Source
git clone https://github.com/bgreenwell/xleak.git
cd xleak
cargo install --path .
Requirements: Rust 1.70 or later
Usage
Interactive TUI Mode (Recommended)
# Launch interactive viewer
xleak quarterly-report.xlsx -i
# Start on a specific sheet
xleak report.xlsx --sheet "Q3 Results" -i
# View formulas by default
xleak data.xlsx -i --formulas
# Enable horizontal scrolling for wide files (auto-size columns)
xleak wide-data.xlsx -i -H
TUI Keyboard Shortcuts:
↑ ↓ ← → - Navigate cells
Enter - View cell details (including formulas)
/ - Search across all cells
n / N - Jump to next/previous search result
Ctrl+G - Jump to specific row/cell (e.g., 100, A50, 10,5)
c - Copy current cell to clipboard
C - Copy entire row to clipboard
Tab / Shift+Tab - Switch between sheets
? - Show help
q - Quit
Non-Interactive Mode
View a spreadsheet
xleak quarterly-report.xlsx
View a specific sheet
# By name
xleak report.xlsx --sheet "Q3 Results"
# By index (1-based)
xleak report.xlsx --sheet 2
Limit displayed rows
# Show only first 20 rows
xleak large-file.xlsx -n 20
# Show all rows
xleak file.xlsx -n 0
Export data
# Export to CSV
xleak data.xlsx --export csv > output.csv
# Export to JSON
xleak data.xlsx --export json > output.json
# Export as plain text (tab-separated)
xleak data.xlsx --export text > output.txt
Work with Excel Tables (.xlsx only)
# List all tables in a workbook
xleak workbook.xlsx --list-tables
# Extract a specific table as JSON (default)
xleak workbook.xlsx --table "Sales"
# Extract table as CSV
xleak workbook.xlsx --table "Sales" --export csv > sales.csv
# Extract table as plain text
xleak workbook.xlsx --table "Employees" --export text
Combine options
# Export specific sheet as CSV
xleak workbook.xlsx --sheet "Sales" --export csv > sales.csv
Examples
# Launch interactive viewer
xleak quarterly-report.xlsx -i
# Quick preview in non-interactive mode
xleak quarterly-report.xlsx
# See specific sheet with limited rows
xleak financial-data.xlsx --sheet "Summary" -n 10
# Interactive mode with formulas visible
xleak data.xlsx -i --formulas
# Export all data from a sheet
xleak survey-results.xlsx --sheet "Responses" --export csv -n 0
Configuration
xleak supports configuration via a TOML file for persistent settings like default theme and keybindings.
VIM-style keybindings for efficient keyboard navigation:
Action
Key
Default Key
Description
VIM Navigation
Move left/down/up/right
hjkl
← ↓ ↑ →
VIM-style movement
Page up/down
Ctrl+uCtrl+d
PgUp PgDn
Half-page scrolling
Jump to top
gg
Ctrl+Home
Jump to first row
Jump to bottom
G (Shift+g)
Ctrl+End
Jump to last row
Jump to row start/end
0$
Home End
First/last column
VIM Actions
Yank cell
y
c
Copy cell (yank)
Yank row
Y (Shift+y)
C
Copy row (yank)
Standard
Quit
q
q
Same as default
Search
/
/
Same as default
Next/prev match
nN
nN
Same as default
All other keys
Same as default profile
Enable VIM mode:
[keybindings]
profile = "vim"
Custom Keybindings
Override individual keys while keeping the profile defaults:
[keybindings]
profile = "default"
[keybindings.custom]
# Use 'x' to quit instead of 'q'
quit = "x"
# Use '?' for search instead of '/'
search = "?"
# Use 'T' (Shift+t) to toggle theme
theme_toggle = "T"
# Use Ctrl+J to jump to cell
jump = "Ctrl+j"