Skip to content

excel cell add

zmworm edited this page Mar 21, 2026 · 53 revisions

Excel: Cell - add

Add cells with values, formulas, and formatting.

Path: /{SheetName}

Properties

Property Default Description
ref (auto) Cell reference (e.g., A1). If omitted, auto-assigns next available cell in row 1
value Cell value
formula Formula (e.g., =SUM(A1:A10))
type auto string/str, number/num, boolean/bool, date
(style keys) See Cell set for style properties

Notes

  • Formula prefix: Leading = sign is automatically stripped from formulas (e.g., formula="=SUM(A1:A10)" works the same as formula="SUM(A1:A10)").
  • Boolean normalization: type=boolean converts true/yes/1 to 1, and false/no/0 to 0.
  • Auto-ref: Adding a cell without ref auto-assigns the next available cell in row 1.

Examples

officecli add data.xlsx /Sheet1 --type cell --prop ref=A1 --prop value="Hello"
officecli add data.xlsx /Sheet1 --type cell --prop ref=B1 --prop formula="=SUM(A1:A10)"
officecli add data.xlsx /Sheet1 --type cell --prop ref=C1 --prop value=100 --prop type=number --prop bold=true --prop fill=FFFF00

Row add

Property Default Description
cols Number of empty cells to create in the row
officecli add data.xlsx /Sheet1 --type row --index 3
officecli add data.xlsx /Sheet1 --type row --index 3 --prop cols=5

Based on OfficeCLI v1.0.11

Clone this wiki locally