-
Notifications
You must be signed in to change notification settings - Fork 465
command view excel
View modes for Excel documents.
Plain text dump of cell values, tab-separated per row.
Output format:
=== Sheet: {SheetName} ===
[/{SheetName}/row[{N}]] value1 value2 value3
[/{SheetName}/row[{N}]] value1 value2 value3
... (showed {N} rows, {total} total in sheet, use --start/--end to view more)
Example output:
=== Sheet: Sheet1 ===
[/Sheet1/row[1]] Month East South North
[/Sheet1/row[2]] Jan 120 95 88
[/Sheet1/row[3]] Feb 135 108 92
Each cell with reference, value, type/formula, and warnings.
Output format:
=== Sheet: {SheetName} ===
{CellRef}: [{value}] ← {type or =formula}
{CellRef}: [{value}] ← {type or =formula} ⚠ formula error
{CellRef}: [] ← Number ⚠ empty
Example output:
=== Sheet: Sheet1 ===
A1: [Month] ← SharedString
B1: [East] ← SharedString
A2: [Jan] ← SharedString
B2: [120] ← Number
C5: [375] ← =SUM(B2:B5)
D3: [#REF!] ← =VLOOKUP(A3,Data!A:B,2) ⚠ formula error
E1: [] ← Number ⚠ empty
Fields:
-
{CellRef}: Cell reference (e.g.,A1,B2) -
[{value}]: Display value (resolved, not the formula) -
← {annotation}: Data type (Number,SharedString,Boolean) or formula (=SUM(...)) -
⚠ empty: Cell has no value and no formula -
⚠ formula error: Formula resolved to#REF!,#VALUE!, or#NAME?
Structural overview: file name, sheets with row/column counts and formula counts.
Output format:
File: {filename}
├── "{SheetName}" ({rows} rows × {cols} cols, {N} formula(s))
├── "{SheetName}" ({rows} rows × {cols} cols)
Example output:
File: data.xlsx
├── "Sheet1" (13 rows × 5 cols, 12 formula(s))
├── "Summary" (5 rows × 3 cols, 3 formula(s))
├── "Raw Data" (1000 rows × 8 cols)
Summary statistics across all sheets.
Output format:
Sheets: {count}
Total Cells: {count}
Empty Cells: {count}
Formula Cells: {count}
Error Cells: {count}
Data Type Distribution:
Number: {count}
SharedString: {count}
Boolean: {count}
Detects formula errors. Each issue has:
| Field | Description |
|---|---|
Id |
Issue identifier (e.g., F1) |
Type |
Content |
Severity |
Error |
Path |
{SheetName}!{CellRef} (e.g., Sheet1!D3) |
Message |
Formula error: #REF! (or #VALUE!, #NAME?, #DIV/0!) |
Context |
The formula text (e.g., =VLOOKUP(A3,Data!A:B,2)) |
Renders spreadsheets as interactive HTML with sheet tabs, formatting, charts, and formulas.
Supports: cell formatting (fonts, colors, borders, alignment, number formats), merged cells, frozen panes, hidden rows/columns, conditional formatting colors, embedded charts (SVG), sheet tab navigation with tab colors, live formula evaluation (including cross-sheet references), RTL/i18n support, print CSS, accessibility (ARIA roles).
Behavior:
- Default: outputs raw HTML to stdout.
- With
--browser: opens in default browser. - Shows truncation warning when rows/cols exceed display limits.
officecli view data.xlsx html
officecli view data.xlsx html --browser# Plain text
officecli view data.xlsx text
# With pagination
officecli view data.xlsx text --start 1 --end 50
# Column filter
officecli view data.xlsx text --cols A,B,C
# Limit output
officecli view data.xlsx text --max-lines 100
# Annotated view (see formulas and types)
officecli view data.xlsx annotated
officecli view data.xlsx annotated --cols A,B,C --start 1 --end 20
# Document structure
officecli view data.xlsx outline
# Statistics
officecli view data.xlsx stats
# Quality check
officecli view data.xlsx issues
# HTML preview
officecli view data.xlsx html
officecli view data.xlsx html --browser
# JSON output
officecli view data.xlsx text --json- view - Command syntax
- Excel Reference - All Excel elements
Based on OfficeCLI v1.0.64