Skip to main content
The workbook. Open or create one, then edit it through worksheets, names and the other collections. Concepts explains the model.

ExcelWorkbook

Office.js-shaped facade over an .xlsx (Excel.Workbook). Handles read the live workbook and every edit applies at once: there is no load()/sync() protocol. Members Office.js lacks are marked as extensions. Import from @reductoai/xlsx/officejs.

ExcelWorkbook properties

ExcelWorkbook.create()

A workbook as Excel makes a new one: one empty “Sheet1”.

ExcelWorkbook.fromBytes()

ExcelWorkbook.getActiveCell()

The active cell of the active worksheet, as the file records it.

ExcelWorkbook.getChartSheetChart()

Extension (Office.js has no chart sheets): the chart that fills chart sheet name, as VBA’s Workbook.Charts(name) gives it. Its position and size are the sheet’s and cannot change.

ExcelWorkbook.getRange()

Extension: an address such as “Sheet1!A1:B2” or a defined name, on whichever sheet it names.

ExcelWorkbook.insertWorksheetsFromBase64()

Copies worksheets of another .xlsx in, with their formats, drawings and tables; comments, pivot tables and controls stay behind. A taken name becomes “Name (2)”, as in Excel.

ExcelWorkbook.set()

Sets several properties at once; a navigation member takes a nested batch.

ExcelWorkbook.toBytes()

Extension: the package with every edit written.

Node additions

ExcelWorkbook.create() (node)

A workbook as Excel makes a new one: one empty “Sheet1”.

ExcelWorkbook.fromBytes() (node)

ExcelWorkbook.open() (node)

ExcelWorkbook.save() (node)

Writes to path; the facade never writes the source file in place.

ExcelWorkbook.toPdf() (node)

One PDF page per sheet, in points at 0.75 pt per pixel; writes path when given.

ExcelWorkbook.toPng() (node)

One PNG per sheet.

SheetPictureOptions

Import from @reductoai/xlsx/node.

ToPngOptions

Import from @reductoai/xlsx/node.

RenderedSheet

Import from @reductoai/xlsx/node.

WorksheetCollection

Excel.WorksheetCollection: getItem takes a name or an id. Import from @reductoai/xlsx/officejs.

WorksheetCollection properties

WorksheetCollection.add()

Appends a sheet; without a name it takes the next free “SheetN”.

WorksheetCollection.getActiveWorksheet()

WorksheetCollection.getCount()

WorksheetCollection.getFirst()

WorksheetCollection.getItem()

WorksheetCollection.getItemAt()

WorksheetCollection.getItemOrNullObject()

Office.js null-object variant; inspect isNullObject before other members.

WorksheetCollection.getLast()

ExcelApplication

Import from @reductoai/xlsx/officejs.

ExcelApplication properties

ExcelApplication.calculate()

ExcelApplication.set()

Sets several properties at once; a navigation member takes a nested batch.

ExcelApplication.suspendApiCalculationUntilNextSync()

Edits apply at once here, so there is nothing to suspend.

ExcelApplication.suspendScreenUpdatingUntilNextSync()

ExcelApplication.union()

The two ranges’ areas as one; both must be on the same sheet.

IterativeCalculation

Excel.IterativeCalculation: the workbook’s calcPr iteration settings. Setting one recalculates. Import from @reductoai/xlsx/officejs.

IterativeCalculation properties

IterativeCalculation.set()

Sets several properties at once; a navigation member takes a nested batch.