Skip to content

API Reference

56 interfaces, 830 methods, 585 types.

Machine-readable: api-spec.json · llms.txt

Common Methods

Quick reference for the most frequently used methods. Click any interface name for full documentation.

MethodDescription
createWorkbook()Create a new empty workbook
openWorkbook(path)Open an existing XLSX file
save(wb, path)Save workbook to XLSX
wb.getActiveSheet()Get the currently active worksheet
wb.getSheetByName(name)Get a sheet by name
wb.calculate()Recalculate all formulas
wb.batch(fn)Group operations into a single undo step
ws.setCell(ref, value)Set a cell value or formula
ws.getValue(ref)Read a cell's computed value
ws.setRange(ref, data)Write a 2D array to a range
ws.getRange(ref)Read a range as a 2D array
ws.tables.add({range, name})Create a structured table
ws.charts.add({type, range})Insert a chart from data
ws.pivots.add({source, dest})Create a pivot table

Workbook

Worksheet

Types

585 type definitions. View all types →