Skip to main content

Workbook Object

SheetJS workbook objects represent collections of worksheets and associated workbook-level metadata.

For a given workbook object wb:

wb.SheetNames is an ordered list of the sheets in the workbook.

wb.Sheets is an object whose keys are worksheet names (from SheetNames) and whose values are worksheet objects.

wb.Workbook stores workbook-level attributes.

When reading a file, wb.bookType is the determined book type.

File Properties

wb.Props is an object storing the standard properties.

wb.Custprops stores custom properties.

"File Properties" covers the feature in more detail.

Workbook-Level Attributes

wb.Workbook stores workbook-level attributes.

Defined Names

wb.Workbook.Names is an array of defined name objects. Defined names are discussed in more detail in "Defined Names"

Workbook Views

wb.Workbook.Views is an array of workbook view objects which have the keys:

KeyDescription
RTLIf true, display right-to-left

Miscellaneous Workbook Properties

wb.Workbook.WBProps holds other workbook properties:

KeyDescription
CodeNameVBA Workbook Name
date1904epoch: 0/false for 1900 system, 1/true for 1904
filterPrivacyWarn or strip personally identifying info on save

Sheet Metadata

wb.Workbook.Sheets is an array of sheet metadata objects which have the keys:

KeyDescription
HiddenSheet Visibility
CodeNameVBA Sheet Code Name