Edit Excel workbooks from the command line
Forty excel verbs read and change an XLSX without Excel: get and set cells, recalculate formulas, sort, filter, freeze, protect, add sheets, merge and split workbooks. Reads are free; each write is one credit.
jetformat excel get finance.xlsx --sheet Summary --cell B12
jetformat excel set finance.xlsx --sheet Summary --set A1=5 --set B2=Paid --set-formula C1=A1*2 -o finance.xlsx --force
jetformat excel recalc finance.xlsx -o finance.xlsx --forcebrew install jetformat/tap/jetformatnpm install -g jetformatVersion 0.1.7. Extract and put jetformat on PATH.
jetformat --version
jetformat word to-pdf report.docx -o report.pdfinspect / get / set / recalc
Inspect sheets, formulas, and named ranges. set writes a value or formula; recalc updates cached results.
jetformat excel inspect finance.xlsx --json
jetformat excel get finance.xlsx --sheet Summary --cell B12
jetformat excel set finance.xlsx --sheet Summary --cell A1 --value 5 -o finance.xlsx --force
jetformat excel recalc finance.xlsx -o finance.xlsx --forcetable / sort / filter / freeze
Format as table, sort a column, set an auto-filter, freeze panes, and merge cells. Validation is a comma-separated dropdown only.
jetformat excel table finance.xlsx --sheet Summary --range A1:B2 --name Sales -o finance.xlsx --force
jetformat excel sort finance.xlsx --sheet Summary --column A -o finance.xlsx --force
jetformat excel filter finance.xlsx --sheet Summary --range A1:C20 -o finance.xlsx --force
jetformat excel freeze finance.xlsx --sheet Summary --row --col -o finance.xlsx --forceadd-sheet / protect / protect-sheet
Add, copy, rename, or remove visible sheets. protect locks workbook structure; protect-sheet locks one sheet.
jetformat excel add-sheet finance.xlsx --name Extra -o finance.xlsx --force
jetformat excel copy-sheet finance.xlsx --from Summary --name Copy -o finance.xlsx --force
jetformat excel protect finance.xlsx --password secret -o finance.xlsx --force
jetformat excel protect-sheet finance.xlsx --sheet Summary --password secret -o finance.xlsx --forceinsert-row / hide-column / print-area
Insert or hide rows and columns. There is no delete-row command. Column width is a character width.
jetformat excel insert-row finance.xlsx --sheet Summary --row 2 -o finance.xlsx --force
jetformat excel hide-column finance.xlsx --sheet Summary --column A -o finance.xlsx --force
jetformat excel column-width finance.xlsx --sheet Summary --column A --width 18 -o finance.xlsx --force
jetformat excel print-area finance.xlsx --sheet Summary --range A1:B2 -o finance.xlsx --forcemerge / split
Merge copies cell values and formulas from visible sheets. Charts and images may not copy.
jetformat excel merge a.xlsx b.xlsx -o workbook.xlsx --force
jetformat excel split workbook.xlsx -o workbook-parts --forceQuestions
Can a script read one cell without opening Excel?
Yes. excel get prints the value, the raw value, and the formula of any cell. It is free and needs no account.
Do formulas recalculate after set?
Run excel recalc after writing values so cached results match. Files from libraries like openpyxl need this before to-pdf.
Is any of this billed?
excel get, inspect, and names are free and need no account. A command that writes a new XLSX is one credit: excel set with fifty --set pairs is still one credit. excel to-pdf costs a cent a page.
Does not
- Creating a workbook from nothing; start from a template
- Legacy .xls and macro-enabled .xlsm
- Charts and images may not survive merge
- No delete-row command yet
Convert one real file today.
Install in a minute. Reading and editing files is free forever. Writing pages comes with 80 free a month, then a plan or a pack at a cent a page.
brew install jetformat/tap/jetformatnpm install -g jetformatVersion 0.1.7. Extract and put jetformat on PATH.
jetformat --version
jetformat word to-pdf report.docx -o report.pdf