Workbook

new Workbook(): Workbook

Returns Workbook

maxExcel2007CellFormatCount: number
maxExcel2007ColumnCount: number
maxExcel2007RowCount: number
maxExcelCellFormatCount: number
maxExcelColumnCount: number
maxExcelRowCount: number
maxExcelWorkbookFonts: number

Gets or sets the value which indicates how a formula will be recalculated when a referenced value changes.

get calculationMode(): CalculationMode

Returns CalculationMode

set calculationMode(a: CalculationMode): void

Parameters

Returns void

Gets or sets the value which indicates the way cells in the workbook are referenced.

get cellReferenceMode(): CellReferenceMode

Returns CellReferenceMode

set cellReferenceMode(a: CellReferenceMode): void

Parameters

Returns void

Gets or sets the culture to use as the current culture for the workbook when doing any culture-aware conversions or comparisons.

get culture(): any

Returns any

set culture(a: any): void

Parameters

  • a: any

Returns void

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 or sets the date system used internally by Microsoft Excel. The date system used internally by Microsoft Excel.

get dateSystem(): DateSystem

Returns DateSystem

set dateSystem(a: DateSystem): void

Parameters

Returns void

Gets or sets the default style for tables in the workbook.

get defaultTableStyle(): WorksheetTableStyle

Returns WorksheetTableStyle

set defaultTableStyle(a: WorksheetTableStyle): void

Parameters

Returns void

Gets the properties associated with the workbook document.

get documentProperties(): DocumentProperties

Returns DocumentProperties

The editing culture affects certain language specific features such as formatting of dates. or comparisons.

get editingCulture(): any

Returns any

set editingCulture(a: any): void

Parameters

  • a: any

Returns void

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 value indicating whether the [[Workbook]] is currently being saved.

get isSaving(): boolean

Returns boolean

set isSaving(a: boolean): void

Parameters

  • a: boolean

Returns void

Gets or sets the value which indicates whether iterations are allowed while calculating formulas containing circular references.

get iterativeCalculationsEnabled(): boolean

Returns boolean

set iterativeCalculationsEnabled(a: boolean): void

Parameters

  • a: boolean

Returns void

Gets or sets the maximum change of the values in a formula between iterations which will exit from iteration.

get maxChangeInIteration(): number

Returns number

set maxChangeInIteration(a: number): void

Parameters

  • a: number

Returns void

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

get maxColumnCount(): number

Returns number

Gets or sets the maximum number of times formulas should be iteratively calculated.

get maxRecursionIterations(): number

Returns number

set maxRecursionIterations(a: number): void

Parameters

  • a: number

Returns void

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

get maxRowCount(): number

Returns number

Gets or sets the precision to use when obtaining a cell's value.

get precision(): Precision

Returns Precision

set precision(a: Precision): void

Parameters

Returns void

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

get protection(): WorkbookProtection

Returns WorkbookProtection

Gets or sets the value which indicates whether the workbook should recalculate all formulas before saving.

get recalculateBeforeSave(): boolean

Returns boolean

set recalculateBeforeSave(a: boolean): void

Parameters

  • a: boolean

Returns void

Gets or sets the value which indicates whether to save values linked from external workbooks.

get saveExternalLinkedValues(): boolean

Returns boolean

set saveExternalLinkedValues(a: boolean): void

Parameters

  • a: boolean

Returns void

Gets or sets the Dpi to use when calculating row and column sizes for the workbook. If empty, the system Dpi will be used.

get screenDpi(): IgSize

Returns IgSize

set screenDpi(a: IgSize): void

Parameters

  • a: IgSize

Returns void

Gets or sets the value which indicates whether carriage return characters should be removed from string values in cells when the workbook is saved to an Excel file.

get shouldRemoveCarriageReturnsOnSave(): boolean

Returns boolean

set shouldRemoveCarriageReturnsOnSave(a: boolean): void

Parameters

  • a: boolean

Returns void

Gets or sets the value indicating whether the format strings should be validated when they are set.

get validateFormatStrings(): boolean

Returns boolean

set validateFormatStrings(a: boolean): void

Parameters

  • a: boolean

Returns void

Gets the options which control various workbook level display properties.

get windowOptions(): WorkbookWindowOptions

Returns WorkbookWindowOptions

Gets or sets the default Dpi to use when calculating row and column sizes for the workbook. If empty, the resolved system Dpi will be used.

get systemDpi(): IgSize

Returns IgSize

set systemDpi(a: IgSize): void

Parameters

  • a: IgSize

Returns void

_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 | null

Parameters

  • fileName: string

    The filename of an excel file.

Returns WorkbookFormat | null

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

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

Parameters

  • stream: string | Uint8Array<ArrayBufferLike>

    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