Skip to content
Mog is in active development. The GitHub repo, SDK packages, and community channels are not yet available. Follow for launch updates

API Reference

50 interfaces, 674 methods, 460 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
ws.to_dataframe()Convert to pandas DataFrame (Python)

Workbook

Worksheet

Types

460 type definitions. View all types →