Workbook

new Workbook(): Workbook

Returns Workbook

$t: Type
maxExcel2007CellFormatCount: number
maxExcel2007ColumnCount: number
maxExcel2007RowCount: number
maxExcelCellFormatCount: number
maxExcelColumnCount: number
maxExcelRowCount: number
maxExcelWorkbookFonts: number
calculationMode: CalculationMode
cellReferenceMode: CellReferenceMode
culture: any
dateSystem: DateSystem
defaultTableStyle: WorksheetTableStyle
editingCulture: any
isSaving: boolean
iterativeCalculationsEnabled: boolean
maxChangeInIteration: number
maxRecursionIterations: number
precision: Precision
recalculateBeforeSave: boolean
saveExternalLinkedValues: boolean
screenDpi: IgSize
shouldRemoveCarriageReturnsOnSave: boolean
validateFormatStrings: boolean
systemDpi: IgSize

Gets the current format of the workbook. This is the format which will be used when saving and imposing format restrictions.

get currentFormat(): WorkbookFormat

Returns WorkbookFormat

Gets the properties associated with the workbook document.

get documentProperties(): DocumentProperties

Returns DocumentProperties

Returns a boolean indicating if the Workbook has been protected with a password.

get hasProtectionPassword(): boolean

Returns boolean

Indicates if the workbook is currently performing a calculation operation.

get isPerformingAsyncCalculations(): boolean

Returns boolean

Returns a boolean indicating if the Workbook has been protected.

get isProtected(): boolean

Returns boolean

Gets the maximum number of columns allowed in each worksheet based on the [[currentFormat]].

get maxColumnCount(): number

Returns number

Gets the maximum number of rows allowed in each worksheet based on the [[currentFormat]].

get maxRowCount(): number

Returns number

Returns an object that provides information used when the Workbook has been protected.

get protection(): WorkbookProtection

Returns WorkbookProtection

Gets the options which control various workbook level display properties.

get windowOptions(): WorkbookWindowOptions

Returns WorkbookWindowOptions

_d9(): IEnumerable$1<KeyValuePair$2<string, number[]>>

Returns IEnumerable$1<KeyValuePair$2<string, number[]>>

Requests that any current calculation operation be cancelled.

cancelAsyncCalculations(): void

Returns void

Converts units of 1/256s of the average character width to pixels.

characterWidth256thsToPixels(characterWidth256ths: number): number

Parameters

  • characterWidth256ths: number

    The number of units of 1/256s of the average character width.

Returns number

Clears all external data connections from the [[Workbook]].

clearConnectionData(): void

Returns void

Clears all pivot tables and associated slicers from the [[Workbook]].

clearPivotTableData(): void

Returns void

Clears all vba information from the [[Workbook]].

clearVbaData(): void

Returns void

Factory method which creates new workbook font.

createNewWorkbookFont(): IWorkbookFont

Returns IWorkbookFont

Creates new worksheet cell format.

createNewWorksheetCellFormat(): IWorksheetCellFormat

Returns IWorksheetCellFormat

Gets the [[WorksheetTableStyle]] at the specified index.

customTableStyles(index: number): WorksheetTableStyle

Parameters

  • index: number

    The index at which to get the WorksheetTableStyle.

Returns WorksheetTableStyle

Gets the custom view at the specified index. The custom view at the specified index.

customViews(index: number): CustomView

Parameters

  • index: number

    The zero-based index of the custom view to get.

Returns CustomView

Gets the table with the specified name.

getTable(name: string): WorksheetTable

Parameters

  • name: string

    The name of the table to get.

Returns WorksheetTable

Gets a value indicating whether the specified function will be recognized and solved by Microsoft Excel when the workbook is saved out.

isValidFunctionName(functionName: string): boolean

Parameters

  • functionName: string

    The case-insensitive name of the function.

Returns boolean

Gets the named reference at the specified index. The named reference at the specified index.

namedReferences(index: number): NamedReference

Parameters

  • index: number

    The zero-based index of the named reference to get.

Returns NamedReference

Gets or sets a color in the palette.

palette(index: number, value: any): string

Parameters

  • index: number

    The index of the color to get or set in the palette.

  • value: any

Returns string

Converts pixels to units of 1/256s of the average character width.

pixelsToCharacterWidth256ths(pixels: number): number

Parameters

  • pixels: number

    The number of pixels.

Returns number

Protects the Workbook without a password.

protect(allowEditStructure: boolean, allowEditWindows: boolean): void

Parameters

  • allowEditStructure: boolean

    Optional boolean indicating the new value for the [[WorkbookProtection.allowEditStructure]].

  • allowEditWindows: boolean

    Optional boolean indicating the new value for the [[WorkbookProtection.allowEditWindows]].

Returns void

Recalculates all dirty formulas pending a calculation on the workbook.

recalculate(): void

Returns void

Recalculates all formulas on the workbook.

recalculateAsync(includeNonDirtyFormulas: boolean): void

Parameters

  • includeNonDirtyFormulas: boolean

    True to recalculate all formulas on the workbook regardless of whether they had a pending evaluation. False to only calculate dirty formulas.

Returns void

Registers a single [[ExcelCalcFunction]] instance.

registerUserDefinedFunction(userDefinedFunction: ExcelCalcFunction): boolean

Parameters

Returns boolean

Resumes the calculation of formulas.

resumeCalculations(): void

Returns void

Writes the workbook to a Uint8Array.

save(saveOptions: WorkbookSaveOptions, successCallback: object, failCallback: object): void

Parameters

  • saveOptions: WorkbookSaveOptions

    The options to use to save the stream or null to use the default options.

  • successCallback: object

    The function to call when the Workbook has been successfully saved into a Uint8Array or base-64 encoded string.

  • failCallback: object

    The function to call when saving the Workbook has caused an error.

Returns void

Sets the current format of the workbook.

setCurrentFormat(format: WorkbookFormat): void

Parameters

  • format: WorkbookFormat

    The file format to use when imposing format restrictions and saving.

Returns void

Gets the sheet at the specified index. The sheet at the specified index.

sheets(index: number): Sheet

Parameters

  • index: number

    The zero-based index of the sheet to get.

Returns Sheet

Gets the [[WorksheetTableStyle]] at the specified index.

standardTableStyles(index: number): WorksheetTableStyle

Parameters

  • index: number

    The index at which to get the WorksheetTableStyle.

Returns WorksheetTableStyle

Gets the style at the specified index. The style at the specified index.

styles(index: number): WorkbookStyle

Parameters

  • index: number

    The zero-based index of the style to get.

Returns WorkbookStyle

Temporarily suspends the calculation of formulas.

suspendCalculations(): void

Returns void

Removes the Workbook protection.

unprotect(): void

Returns void

Gets the worksheet at the specified index. The worksheet at the specified index.

worksheets(index: number): Worksheet

Parameters

  • index: number

    The zero-based index of the worksheet to get.

Returns Worksheet

Returns the number of columns that are supported by the specified format.

getMaxColumnCount(format: WorkbookFormat): number

Parameters

Returns number

Returns the number of rows that are supported by the specified format.

getMaxRowCount(format: WorkbookFormat): number

Parameters

Returns number

Returns the WorkbookFormat based on the file extension of the specified file.

getWorkbookFormat(fileName: string): WorkbookFormat

Parameters

  • fileName: string

    The filename of an excel file.

Returns WorkbookFormat

Determines whether the workbook in the specified stream is encrypted with an open password.

isWorkbookEncrypted(stream: string | Uint8Array<ArrayBuffer>): boolean

Parameters

  • stream: string | Uint8Array<ArrayBuffer>

    The stream to check for encryption.

Returns boolean

Loads a workbook from a File.

load(file: File, loadOptions: WorkbookLoadOptions, successCallback: object, failCallback: object): void

Parameters

  • file: File

    The file from which to load the workbook.

  • loadOptions: WorkbookLoadOptions

    The options to use to load the stream or null to use the default options.

  • successCallback: object

    The function to call when the Workbook has been successfully loaded.

  • failCallback: object

    The function to call when loading the Workbook has resulted in an error.

Returns void

staticInit(): void

Returns void