Constructors
Section titled "Constructors"Workbook
new Workbook(): Workbook Returns Workbook
Properties
Section titled "Properties"$t: Type maxExcel2007CellFormatCount
Section titled "maxExcel2007CellFormatCount"maxExcel2007CellFormatCount: number maxExcel2007ColumnCount
Section titled "maxExcel2007ColumnCount"maxExcel2007ColumnCount: number maxExcel2007RowCount
Section titled "maxExcel2007RowCount"maxExcel2007RowCount: number maxExcelCellFormatCount
Section titled "maxExcelCellFormatCount"maxExcelCellFormatCount: number maxExcelColumnCount
Section titled "maxExcelColumnCount"maxExcelColumnCount: number maxExcelRowCount
Section titled "maxExcelRowCount"maxExcelRowCount: number maxExcelWorkbookFonts
Section titled "maxExcelWorkbookFonts"maxExcelWorkbookFonts: number calculationMode
Section titled "calculationMode"calculationMode: CalculationMode cellReferenceMode
Section titled "cellReferenceMode"cellReferenceMode: CellReferenceMode culture
Section titled "culture"culture: any dateSystem
Section titled "dateSystem"dateSystem: DateSystem defaultTableStyle
Section titled "defaultTableStyle"defaultTableStyle: WorksheetTableStyle editingCulture
Section titled "editingCulture"editingCulture: any isSaving
Section titled "isSaving"isSaving: boolean iterativeCalculationsEnabled
Section titled "iterativeCalculationsEnabled"iterativeCalculationsEnabled: boolean maxChangeInIteration
Section titled "maxChangeInIteration"maxChangeInIteration: number maxRecursionIterations
Section titled "maxRecursionIterations"maxRecursionIterations: number precision
Section titled "precision"precision: Precision recalculateBeforeSave
Section titled "recalculateBeforeSave"recalculateBeforeSave: boolean saveExternalLinkedValues
Section titled "saveExternalLinkedValues"saveExternalLinkedValues: boolean screenDpi
Section titled "screenDpi"screenDpi: IgSize shouldRemoveCarriageReturnsOnSave
Section titled "shouldRemoveCarriageReturnsOnSave"shouldRemoveCarriageReturnsOnSave: boolean validateFormatStrings
Section titled "validateFormatStrings"validateFormatStrings: boolean systemDpi
Section titled "systemDpi"systemDpi: IgSize Accessors
Section titled "Accessors"currentFormat
Section titled "currentFormat"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
documentProperties
Section titled "documentProperties"Gets the properties associated with the workbook document.
get documentProperties(): DocumentProperties Returns DocumentProperties
hasProtectionPassword
Section titled "hasProtectionPassword"Returns a boolean indicating if the Workbook has been protected with a password.
get hasProtectionPassword(): boolean Returns boolean
isPerformingAsyncCalculations
Section titled "isPerformingAsyncCalculations"Indicates if the workbook is currently performing a calculation operation.
get isPerformingAsyncCalculations(): boolean Returns boolean
isProtected
Section titled "isProtected"Returns a boolean indicating if the Workbook has been protected.
get isProtected(): boolean Returns boolean
maxColumnCount
Section titled "maxColumnCount"Gets the maximum number of columns allowed in each worksheet based on the [[currentFormat]].
get maxColumnCount(): number Returns number
maxRowCount
Section titled "maxRowCount"Gets the maximum number of rows allowed in each worksheet based on the [[currentFormat]].
get maxRowCount(): number Returns number
protection
Section titled "protection"Returns an object that provides information used when the Workbook has been protected.
get protection(): WorkbookProtection Returns WorkbookProtection
windowOptions
Section titled "windowOptions"Gets the options which control various workbook level display properties.
get windowOptions(): WorkbookWindowOptions Returns WorkbookWindowOptions
Methods
Section titled "Methods"_d9(): IEnumerable$1<KeyValuePair$2<string, number[]>> Returns IEnumerable$1<KeyValuePair$2<string, number[]>>
cancelAsyncCalculations
Section titled "cancelAsyncCalculations"Requests that any current calculation operation be cancelled.
cancelAsyncCalculations(): void Returns void
characterWidth256thsToPixels
Section titled "characterWidth256thsToPixels"Converts units of 1/256s of the average character width to pixels.
characterWidth256thsToPixels(characterWidth256ths: number): number Parameters
- characterWidth256ths:
numberThe number of units of 1/256s of the average character width.
Returns number
clearConnectionData
Section titled "clearConnectionData"Clears all external data connections from the [[Workbook]].
clearConnectionData(): void Returns void
clearPivotTableData
Section titled "clearPivotTableData"Clears all pivot tables and associated slicers from the [[Workbook]].
clearPivotTableData(): void Returns void
clearVbaData
Section titled "clearVbaData"Clears all vba information from the [[Workbook]].
clearVbaData(): void Returns void
createNewWorkbookFont
Section titled "createNewWorkbookFont"Factory method which creates new workbook font.
createNewWorkbookFont(): IWorkbookFont Returns IWorkbookFont
createNewWorksheetCellFormat
Section titled "createNewWorksheetCellFormat"Creates new worksheet cell format.
createNewWorksheetCellFormat(): IWorksheetCellFormat Returns IWorksheetCellFormat
customTableStyles
Section titled "customTableStyles"Gets the [[WorksheetTableStyle]] at the specified index.
customTableStyles(index: number): WorksheetTableStyle Parameters
- index:
numberThe index at which to get the WorksheetTableStyle.
Returns WorksheetTableStyle
customViews
Section titled "customViews"Gets the custom view at the specified index. The custom view at the specified index.
customViews(index: number): CustomView Parameters
- index:
numberThe zero-based index of the custom view to get.
Returns CustomView
getTable
Section titled "getTable"Gets the table with the specified name.
getTable(name: string): WorksheetTable Parameters
- name:
stringThe name of the table to get.
Returns WorksheetTable
isValidFunctionName
Section titled "isValidFunctionName"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:
stringThe case-insensitive name of the function.
Returns boolean
namedReferences
Section titled "namedReferences"Gets the named reference at the specified index. The named reference at the specified index.
namedReferences(index: number): NamedReference Parameters
- index:
numberThe zero-based index of the named reference to get.
Returns NamedReference
palette
Section titled "palette"Gets or sets a color in the palette.
palette(index: number, value: any): string Parameters
- index:
numberThe index of the color to get or set in the palette.
- value:
any
Returns string
pixelsToCharacterWidth256ths
Section titled "pixelsToCharacterWidth256ths"Converts pixels to units of 1/256s of the average character width.
pixelsToCharacterWidth256ths(pixels: number): number Parameters
- pixels:
numberThe number of pixels.
Returns number
protect
Section titled "protect"Protects the Workbook without a password.
protect(allowEditStructure: boolean, allowEditWindows: boolean): void Parameters
- allowEditStructure:
booleanOptional boolean indicating the new value for the [[WorkbookProtection.allowEditStructure]].
- allowEditWindows:
booleanOptional boolean indicating the new value for the [[WorkbookProtection.allowEditWindows]].
Returns void
recalculate
Section titled "recalculate"Recalculates all dirty formulas pending a calculation on the workbook.
recalculate(): void Returns void
recalculateAsync
Section titled "recalculateAsync"Recalculates all formulas on the workbook.
recalculateAsync(includeNonDirtyFormulas: boolean): void Parameters
- includeNonDirtyFormulas:
booleanTrue to recalculate all formulas on the workbook regardless of whether they had a pending evaluation. False to only calculate dirty formulas.
Returns void
registerUserDefinedFunction
Section titled "registerUserDefinedFunction"Registers a single [[ExcelCalcFunction]] instance.
registerUserDefinedFunction(userDefinedFunction: ExcelCalcFunction): boolean Parameters
- userDefinedFunction:
ExcelCalcFunctionUser defined function instance to register
Returns boolean
resumeCalculations
Section titled "resumeCalculations"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:
WorkbookSaveOptionsThe options to use to save the stream or null to use the default options.
- successCallback:
objectThe function to call when the Workbook has been successfully saved into a Uint8Array or base-64 encoded string.
- failCallback:
objectThe function to call when saving the Workbook has caused an error.
Returns void
setCurrentFormat
Section titled "setCurrentFormat"Sets the current format of the workbook.
setCurrentFormat(format: WorkbookFormat): void Parameters
- format:
WorkbookFormatThe file format to use when imposing format restrictions and saving.
Returns void
sheets
Section titled "sheets"Gets the sheet at the specified index. The sheet at the specified index.
sheets(index: number): Sheet Parameters
- index:
numberThe zero-based index of the sheet to get.
Returns Sheet
standardTableStyles
Section titled "standardTableStyles"Gets the [[WorksheetTableStyle]] at the specified index.
standardTableStyles(index: number): WorksheetTableStyle Parameters
- index:
numberThe index at which to get the WorksheetTableStyle.
Returns WorksheetTableStyle
styles
Section titled "styles"Gets the style at the specified index. The style at the specified index.
styles(index: number): WorkbookStyle Parameters
- index:
numberThe zero-based index of the style to get.
Returns WorkbookStyle
suspendCalculations
Section titled "suspendCalculations"Temporarily suspends the calculation of formulas.
suspendCalculations(): void Returns void
unprotect
Section titled "unprotect"Removes the Workbook protection.
unprotect(): void Returns void
worksheets
Section titled "worksheets"Gets the worksheet at the specified index. The worksheet at the specified index.
worksheets(index: number): Worksheet Parameters
- index:
numberThe zero-based index of the worksheet to get.
Returns Worksheet
getMaxColumnCount
Section titled "getMaxColumnCount"Returns the number of columns that are supported by the specified format.
getMaxColumnCount(format: WorkbookFormat): number Parameters
- format:
WorkbookFormatThe format used by the workbook.
Returns number
getMaxRowCount
Section titled "getMaxRowCount"Returns the number of rows that are supported by the specified format.
getMaxRowCount(format: WorkbookFormat): number Parameters
- format:
WorkbookFormatThe format used by the workbook.
Returns number
getWorkbookFormat
Section titled "getWorkbookFormat"Returns the WorkbookFormat based on the file extension of the specified file.
getWorkbookFormat(fileName: string): WorkbookFormat Parameters
- fileName:
stringThe filename of an excel file.
Returns WorkbookFormat
isWorkbookEncrypted
Section titled "isWorkbookEncrypted"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:
FileThe file from which to load the workbook.
- loadOptions:
WorkbookLoadOptionsThe options to use to load the stream or null to use the default options.
- successCallback:
objectThe function to call when the Workbook has been successfully loaded.
- failCallback:
objectThe function to call when loading the Workbook has resulted in an error.
Returns void
staticInit
Section titled "staticInit"staticInit(): void