Class Workbook

Hierarchy

  • Base
    • Workbook

Constructors

constructor

  • Returns Workbook

  • Parameters

    Returns Workbook

  • Parameters

    • Rest ..._rest: any[]

    Returns Workbook

Properties

$type

$type: Type

Static $t

$t: Type = markType(Workbook, 'Workbook')

Static maxExcel2007CellFormatCount

maxExcel2007CellFormatCount: number = 64000

Static maxExcel2007ColumnCount

maxExcel2007ColumnCount: number = 16384

Static maxExcel2007RowCount

maxExcel2007RowCount: number = 1048576

Static maxExcelCellFormatCount

maxExcelCellFormatCount: number = 4000

Static maxExcelColumnCount

maxExcelColumnCount: number = 256

Static maxExcelRowCount

maxExcelRowCount: number = 65536

Static maxExcelWorkbookFonts

maxExcelWorkbookFonts: number = 512

Static nextHashCode

nextHashCode: number

Accessors

calculationMode

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

    If this is set to a value of Manual, the recalculateBeforeSave property will determine if formulas are recalculated just before saving the file. Otherwise, that property is ignored.

    The value which indicates how a formula will be recalculated when a referenced value changes.
    throws

    InvalidEnumArgumentException The assigned value is not defined in the calculationMode enumeration.

    see

    recalculateBeforeSave

    Returns CalculationMode

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

    If this is set to a value of Manual, the recalculateBeforeSave property will determine if formulas are recalculated just before saving the file. Otherwise, that property is ignored.

    The value which indicates how a formula will be recalculated when a referenced value changes.

    Parameters

    Returns void

cellReferenceMode

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

    The value of this property will affect the row and columns labels of the workbook when opened in Microsoft Excel. In addition, it will affect the display of formulas referencing different cells.

    The value which indicates the way cells in the workbook are referenced.
    throws

    InvalidEnumArgumentException The assigned value is not defined in the cellReferenceMode enumeration.

    Returns CellReferenceMode

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

    The value of this property will affect the row and columns labels of the workbook when opened in Microsoft Excel. In addition, it will affect the display of formulas referencing different cells.

    The value which indicates the way cells in the workbook are referenced.

    Parameters

    Returns void

culture

  • get culture(): string | CultureInfo
  • set culture(a: string | CultureInfo): void
  • Gets or sets the culture to use as the current culture for the workbook when doing any culture-aware conversions or comparisons.

    Note: The culture is not saved or loaded in workbook files, so this is only used at when accessing and manipulating objects owned or associated with the Workbook.

    The current culture for the workbook or Null to use the thread's current culture.

    Returns string | CultureInfo

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

    Note: The culture is not saved or loaded in workbook files, so this is only used at when accessing and manipulating objects owned or associated with the Workbook.

    The current culture for the workbook or Null to use the thread's current culture.

    Parameters

    • a: string | CultureInfo

    Returns void

currentFormat

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

    see

    setCurrentFormat

    Returns WorkbookFormat

dateSystem

  • Gets or sets the date system used internally by Microsoft Excel. The date system used internally by Microsoft Excel.

    throws

    InvalidEnumArgumentException The assigned value is not defined in the dateSystem enumeration.

    Returns DateSystem

  • Gets or sets the date system used internally by Microsoft Excel. The date system used internally by Microsoft Excel.

    Parameters

    Returns void

defaultTableStyle

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

    This can be set to any WorksheetTableStyle in the customTableStyles or standardTableStyles collection.

    This will never return a null value. If it is set to null, it will be reset to the TableStyleMedium2 table style.

    If this value is changed, it will not be applied to existing tables in the workbook. Only newly created tables will use default table style on the workbook.

    throws

    [[ArgumentException]] The specified value is not in the customTableStyles or standardTableStyles collections.

    see

    customTableStyles

    see

    standardTableStyles

    see

    WorksheetTable.style

    Returns WorksheetTableStyle

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

    This can be set to any WorksheetTableStyle in the customTableStyles or standardTableStyles collection.

    This will never return a null value. If it is set to null, it will be reset to the TableStyleMedium2 table style.

    If this value is changed, it will not be applied to existing tables in the workbook. Only newly created tables will use default table style on the workbook.

    Parameters

    Returns void

documentProperties

  • Gets the properties associated with the workbook document.

    The document properties are pieces of information which provide details on the content of the workbook, such as the author, title, and subject of the workbook.

    The properties associated with the workbook document.

    Returns DocumentProperties

editingCulture

  • get editingCulture(): string | CultureInfo
  • set editingCulture(a: string | CultureInfo): void
  • The editing culture affects certain language specific features such as formatting of dates. or comparisons.

    Note: The EditingCulture is not saved or loaded in workbook files, so this is only used at when accessing and manipulating objects owned or associated with the Workbook.

    see

    culture

    Returns string | CultureInfo

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

    Note: The EditingCulture is not saved or loaded in workbook files, so this is only used at when accessing and manipulating objects owned or associated with the Workbook.

    Parameters

    • a: string | CultureInfo

    Returns void

hasProtectionPassword

  • get hasProtectionPassword(): boolean
  • Returns a boolean indicating if the Workbook has been protected with a password.

    When protecting a Workbook, a password is optional. The HasProtectionPassword will return true if the Workbook is currently protected (see isProtected) and a password was specified when it was protected. To protect a Workbook without a password, one may use the protect method that doesn't take a password.

    see

    isProtected

    see

    protection

    see

    WorkbookProtection

    see

    protect

    see

    unprotect

    Returns boolean

isProtected

  • get isProtected(): boolean
  • Returns a boolean indicating if the Workbook has been protected.

    The IsProtected property will return true if the Workbook is currently protected. When a Workbook is protected certain operations related to the Worksheets displayed or their order or the properties of the windows for the Workbook may be restricted based on the values of the protection.

    see

    hasProtectionPassword

    see

    protection

    see

    WorkbookProtection

    see

    protect

    see

    unprotect

    Returns boolean

isSaving

  • get isSaving(): boolean
  • set isSaving(a: boolean): void
  • Gets the value indicating whether the Workbook is currently being saved.

    Returns boolean

  • Gets the value indicating whether the Workbook is currently being saved.

    Parameters

    • a: boolean

    Returns void

iterativeCalculationsEnabled

  • get iterativeCalculationsEnabled(): boolean
  • set iterativeCalculationsEnabled(a: boolean): void
  • Gets or sets the value which indicates whether iterations are allowed while calculating formulas containing circular references.

    When iterative calculations are enabled, a formula is allowed to use circular references, or directly or indirectly reference the cell to which it belongs. Microsoft Excel stops iteratively calculating formulas after iterating maxRecursionIterations times or when all formula values change by less than maxChangeInIteration between two iterations.

    When iterative calculations are disabled, circular references are not allowed, and a formula which references the cell to which it belongs, directly or indirectly, will cause Microsoft Excel to show an error message and the cell will contain a Circularity error.

    The value which indicates whether iterations are allowed while calculating recursive formulas.
    see

    ErrorValue.circularity

    see

    maxChangeInIteration

    see

    maxRecursionIterations

    Returns boolean

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

    When iterative calculations are enabled, a formula is allowed to use circular references, or directly or indirectly reference the cell to which it belongs. Microsoft Excel stops iteratively calculating formulas after iterating maxRecursionIterations times or when all formula values change by less than maxChangeInIteration between two iterations.

    When iterative calculations are disabled, circular references are not allowed, and a formula which references the cell to which it belongs, directly or indirectly, will cause Microsoft Excel to show an error message and the cell will contain a Circularity error.

    The value which indicates whether iterations are allowed while calculating recursive formulas.

    Parameters

    • a: boolean

    Returns void

maxChangeInIteration

  • get maxChangeInIteration(): number
  • set maxChangeInIteration(a: number): void
  • Gets or sets the maximum change of the values in a formula between iterations which will exit from iteration.

    This property is only valid when iterativeCalculationsEnabled is True. Otherwise it is ignored.

    When iterative calculations, or circular references, are enabled, this property determines the maximum change in all values of a formula between two iterations that will cause the formula to exit iterative calculations. Iterative calculations will also be stopped if the formula iterates maxRecursionIterations times.

    The maximum change of the values in a formula between iterations which will exit from iteration.
    see

    iterativeCalculationsEnabled

    see

    maxRecursionIterations

    Returns number

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

    This property is only valid when iterativeCalculationsEnabled is True. Otherwise it is ignored.

    When iterative calculations, or circular references, are enabled, this property determines the maximum change in all values of a formula between two iterations that will cause the formula to exit iterative calculations. Iterative calculations will also be stopped if the formula iterates maxRecursionIterations times.

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

    Parameters

    • a: number

    Returns void

maxColumnCount

  • get maxColumnCount(): number
  • Gets the maximum number of columns allowed in each worksheet based on the currentFormat.

    Returns number

maxRecursionIterations

  • get maxRecursionIterations(): number
  • set maxRecursionIterations(a: number): void
  • Gets or sets the maximum number of times formulas should be iteratively calculated.

    This property is only valid when iterativeCalculationsEnabled is True. Otherwise it is ignored.

    When iterative calculations, or circular references, are enabled, this property determines the number of iterations allowed when calculating iteratively.

    The maximum number of times formulas should be iteratively calculated.
    throws

    [[ArgumentOutOfRangeException]] The assigned value is outside the valid range of 1 and 32767.

    see

    iterativeCalculationsEnabled

    see

    maxChangeInIteration

    Returns number

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

    This property is only valid when iterativeCalculationsEnabled is True. Otherwise it is ignored.

    When iterative calculations, or circular references, are enabled, this property determines the number of iterations allowed when calculating iteratively.

    The maximum number of times formulas should be iteratively calculated.

    Parameters

    • a: number

    Returns void

maxRowCount

  • get maxRowCount(): number
  • Gets the maximum number of rows allowed in each worksheet based on the currentFormat.

    Returns number

precision

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

    The precision determines whether to use the actual value of the cell or the display value of the cell. These are typically the same, but the format of a cell could cause a loss of precision in the displayed value. For example, if a cell's value is 18.975, and a currency format is used for the cell, the display value will be 18.98.

    The precision to use when obtaining a cell's value.
    throws

    InvalidEnumArgumentException The assigned value is not defined in the enumeration.

    Returns Precision

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

    The precision determines whether to use the actual value of the cell or the display value of the cell. These are typically the same, but the format of a cell could cause a loss of precision in the displayed value. For example, if a cell's value is 18.975, and a currency format is used for the cell, the display value will be 18.98.

    The precision to use when obtaining a cell's value.

    Parameters

    Returns void

protection

recalculateBeforeSave

  • get recalculateBeforeSave(): boolean
  • set recalculateBeforeSave(a: boolean): void
  • Gets or sets the value which indicates whether the workbook should recalculate all formulas before saving.

    This property only applies if the calculationMode is set to Manual. Otherwise, it is ignored.

    The value which indicates whether the workbook should recalculate all formulas before saving.
    see

    recalculate

    see

    calculationMode

    Returns boolean

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

    This property only applies if the calculationMode is set to Manual. Otherwise, it is ignored.

    The value which indicates whether the workbook should recalculate all formulas before saving.

    Parameters

    • a: boolean

    Returns void

saveExternalLinkedValues

  • get saveExternalLinkedValues(): boolean
  • set saveExternalLinkedValues(a: boolean): void
  • Gets or sets the value which indicates whether to save values linked from external workbooks.

    This value will only be used when the workbook is opened in Microsoft Excel. When referencing external values and saving a workbook through the Excel assembly, external linked values will never be saved.

    The value which indicates whether to save values linked from external workbooks.

    Returns boolean

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

    This value will only be used when the workbook is opened in Microsoft Excel. When referencing external values and saving a workbook through the Excel assembly, external linked values will never be saved.

    The value which indicates whether to save values linked from external workbooks.

    Parameters

    • a: boolean

    Returns void

screenDpi

  • get screenDpi(): IgSize
  • set screenDpi(a: IgSize): 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.

    throws

    [[ArgumentException]] Occurs when the specified value is not empty and does not have two positive values.

    Returns IgSize

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

    Parameters

    • a: IgSize

    Returns void

shouldRemoveCarriageReturnsOnSave

  • get shouldRemoveCarriageReturnsOnSave(): boolean
  • set shouldRemoveCarriageReturnsOnSave(a: boolean): 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.

    In Microsoft Excel 2003, carriage return characters are displayed as boxes. Most of the time, this should not be seen and removing the carriage return characters has no adverse effect on the layout of the text within a cell. Therefore, this property is True by default.

    True if the saved workbook file should not contain the carriage return characters from cell values; False to export the string values as they have been set on the cells.

    Returns boolean

  • 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.

    In Microsoft Excel 2003, carriage return characters are displayed as boxes. Most of the time, this should not be seen and removing the carriage return characters has no adverse effect on the layout of the text within a cell. Therefore, this property is True by default.

    True if the saved workbook file should not contain the carriage return characters from cell values; False to export the string values as they have been set on the cells.

    Parameters

    • a: boolean

    Returns void

validateFormatStrings

  • get validateFormatStrings(): boolean
  • set validateFormatStrings(a: boolean): void
  • Gets or sets the value indicating whether the format strings should be validated when they are set.

    This value is False by default to maintain backward compatibility.

    When True, format strings will be validated when a IWorksheetCellFormat.formatString property is set. An invalid format string will cause an exception. When False, invalid format strings will be allowed, but if the display text of a cell is requested, an exception will be thrown at that time. If invalid format strings are allowed and the workbook is saved and opened in Microsoft Excel, it will show an error.

    see

    IWorksheetCellFormat.formatString

    see

    WorksheetCell.getText

    see

    WorksheetCell.getText

    see

    WorksheetRow.getCellText

    see

    WorksheetRow.getCellText

    Returns boolean

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

    This value is False by default to maintain backward compatibility.

    When True, format strings will be validated when a IWorksheetCellFormat.formatString property is set. An invalid format string will cause an exception. When False, invalid format strings will be allowed, but if the display text of a cell is requested, an exception will be thrown at that time. If invalid format strings are allowed and the workbook is saved and opened in Microsoft Excel, it will show an error.

    Parameters

    • a: boolean

    Returns void

windowOptions

  • Gets the options which control various workbook level display properties.

    The window options control properties of the child MDI window showing the workbook in Microsoft Excel. They also control display options of the workbook which do not change based on the selected worksheet.

    The options which control various workbook level display properties.
    see

    CustomView.windowOptions

    Returns WorkbookWindowOptions

Methods

_d7

  • _d7(): IEnumerable$1<KeyValuePair$2<string, number[]>>
  • Returns IEnumerable$1<KeyValuePair$2<string, number[]>>

characterWidth256thsToPixels

  • characterWidth256thsToPixels(characterWidth256ths: number): number
  • Converts units of 1/256s of the average character width to pixels.

    The units of 1/256s of the average character width are based on the font height of the normal style.

    see

    pixelsToCharacterWidth256ths

    see

    WorksheetColumn.width

    see

    Worksheet.defaultColumnWidth

    Parameters

    • characterWidth256ths: number

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

    Returns number

    The number of pixels equivalent to the 'characterWidth256ths' value.

clearConnectionData

  • clearConnectionData(): void
  • Clears all external data connections from the Workbook.

    Returns void

clearPivotTableData

  • clearPivotTableData(): void
  • Clears all pivot tables and associated slicers from the Workbook.

    Returns void

clearVbaData

  • clearVbaData(): void
  • Clears all vba information from the Workbook.

    Returns void

createNewWorkbookFont

  • Factory method which creates new workbook font.

    IWorkbookFont describes font used in excel workbook. If many parts of excel workbook have same and complex (more than one property in common) font formatting, use this method in following manner:

    1. Create new font format with createNewWorkbookFont,
    2. Set all necessary properties on given font format,
    3. Apply font format to all excel objects which use it with IWorkbookFont.setFontFormatting method.

    Use of this procedure will simplify you code for complex font formats and increase speed of resulting program. It will not reduce total number of font formats in a workbook as font formats are internally cached no matter which method is used.

    Returns IWorkbookFont

    The created excel font object.

createNewWorksheetCellFormat

  • Creates new worksheet cell format.

    IWorksheetCellFormat describes cell specific formatting (font, number format, appearance etc.). Total number of different cell formats in excel workbook is limited to Workbook.maxExcelCellFormatCount. If many parts of excel workbook have same and complex (more than one property in common) cell formatting, use this method in following manner:

    1. Create new cell format with createNewWorksheetCellFormat,
    2. Set all necessary properties on given cell format,
    3. Apply cell format to all excel objects which use it with IWorksheetCellFormat.setFormatting method.

    Use of this procedure will simplify you code for complex cell formats and increase speed of resulting program. It will not reduce total number of cell formats in a workbook as cell formats are internally cached no matter which method is used.

    Returns IWorksheetCellFormat

    The cell format which was created.

customTableStyles

  • Gets the WorksheetTableStyle at the specified index.

    throws

    [[ArgumentOutOfRangeException]] 'index' is less than 0 or greater than or equal to count.

    Parameters

    • index: number

      The index at which to get the WorksheetTableStyle.

    Returns WorksheetTableStyle

    The WorksheetTableStyle instance at the specified index.

  • Gets the WorksheetTableStyle with the specified name.

    Table style names are compared case-insensitively.

    Parameters

    • name: string

      The name of the WorksheetTableStyle to find.

    Returns WorksheetTableStyle

    The WorksheetTableStyle instance with the specified name or null if a table style with that name does not exist.

  • Gets the collection of custom table styles in the workbook.

    see

    defaultTableStyle

    see

    standardTableStyles

    Returns CustomTableStyleCollection

customViews

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

    throws

    [[ArgumentOutOfRangeException]] 'index' is less than zero or 'index' is greater than or equal to count.

    Parameters

    • index: number

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

    Returns CustomView

  • Gets the collection of custom views for the workbook.

    Each custom view stores display settings and optionally print settings, which can later be applied to the workbook and its worksheets as one operation, through both the Microsoft Excel UI and the Excel assembly by calling the CustomView.apply method.

    The collection of custom views for the workbook.
    see

    CustomView

    Returns CustomViewCollection

equals

  • equals(other: any): boolean
  • Parameters

    • other: any

    Returns boolean

getHashCode

  • getHashCode(): number
  • Returns number

getTable

  • Gets the table with the specified name.

    Table names are compared case-insensitively.

    Parameters

    • name: string

      The name of the table to get.

    Returns WorksheetTable

    A WorksheetTable instance if a table exists with the specified name; Otherwise null.

isValidFunctionName

  • isValidFunctionName(functionName: string): boolean
  • Gets a value indicating whether the specified function will be recognized and solved by Microsoft Excel when the workbook is saved out.

    Parameters

    • functionName: string

      The case-insensitive name of the function.

    Returns boolean

    True if the function will be recognized in Microsoft Excel; False otherwise.

memberwiseClone

  • memberwiseClone(): Base
  • Returns Base

namedReferences

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

    throws

    [[ArgumentOutOfRangeException]] 'index' is less than zero or 'index' is greater than or equal to count.

    Parameters

    • index: number

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

    Returns NamedReference

  • Gets the collection of named references in the workbook.

    Named references are typically used to refer to cells or ranges of cells by name. The named reference names are used by formulas instead of explicitly naming the cells or cell ranges.

    The collection of named references in the workbook.
    see

    NamedReference

    Returns NamedReferenceCollection

palette

  • Gets or sets a color in the palette.

    When a color is set in the palette, [[isCustom]] will return True. The palette can than be reset with the reset method.

    Colors added to the palette must be opaque.

    throws

    [[ArgumentOutOfRangeException]] 'index' is less than 0 or greater than 55.

    throws

    [[ArgumentException]] The value assigned is an empty color, a system color, or is not opaque.

    see

    [[isCustom]]

    see

    reset

    Parameters

    • index: number

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

    • Optional value: string | Color

    Returns string

  • Gets the color palette used when the saved file is opened in Microsoft Excel 2003 and earlier versions.

    When the file is opened in Microsoft Excel 2003 and earlier versions, the actual colors used in cells and shapes may not be displayed. Instead, the closest color in the palette will be displayed instead. Therefore, the palette can be customized if necessary to keep the colors as accurate as possible in older versions of Excel.

    Returns WorkbookColorPalette

pixelsToCharacterWidth256ths

  • pixelsToCharacterWidth256ths(pixels: number): number
  • Converts pixels to units of 1/256s of the average character width.

    The units of 1/256s of the average character width are based on the font height of the normal style.

    see

    characterWidth256thsToPixels

    see

    WorksheetColumn.width

    see

    Worksheet.defaultColumnWidth

    Parameters

    • pixels: number

      The number of pixels.

    Returns number

    The number of units of 1/256s of the average character width equivalent to the 'pixels' value.

protect

  • protect(allowEditStructure?: boolean, allowEditWindows?: boolean): void
  • Protects the Workbook without a password.

    When a Workbook is protected without a password, the end user may unprotect the Workbook in Excel without having to supply a password. To programatically unprotect a Workbook, one may use the unprotect method.

    When a Workbook is protected, the values of the properties of the WorkbookProtection instance from this Workbook's protection property indicate the disabled operations.

    Note: If isProtected is already true, the method will be ignored.

    see

    hasProtectionPassword

    see

    isProtected

    see

    protection

    see

    WorkbookProtection

    see

    unprotect

    Parameters

    Returns void

recalculate

  • recalculate(): void
  • recalculate(includeNonDirtyFormulas: boolean): void
  • Recalculates all dirty formulas pending a calculation on the workbook.

    This can be used when the calculationMode is Manual. In Manual mode, when cells are dirtied, formulas referencing those cells will not be recalculated until Recalculate is called or recalculateBeforeSave is True and the workbook is saved.

    To force a recalculation of non-dirty formulas, use the recalculate overload and specify True for the includeNonDirtyFormulas parameter.

    see

    calculationMode

    see

    recalculateBeforeSave

    Returns void

  • Recalculates all formulas on the workbook.

    This can be used when the calculationMode is Manual. In Manual mode, when cells are dirtied, formulas referencing those cells will not be recalculated until Recalculate is called or recalculateBeforeSave is True and the workbook is saved.

    see

    calculationMode

    see

    recalculateBeforeSave

    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

registerUserDefinedFunction

  • registerUserDefinedFunction(userDefinedFunction: ExcelCalcFunction): boolean
  • registerUserDefinedFunction(name: string, minArgs: number, maxArgs: number, evaluate: function): boolean
  • Registers a single ExcelCalcFunction instance.

    Users can build custom functions used in formulas by sub-classing the ExcelCalcFunction class. Once the derived class is instantiated it must be registered by using the RegisterUserDefinedFunction method before being available and referenced by a formulas.

    Parameters

    Returns boolean

    Returns true if the type was registered successfully, else false if the registration failed

  • Registers a custom function.

    Parameters

    Returns boolean

    Returns true if the type was registered successfully, else false if the registration failed

resumeCalculations

  • resumeCalculations(): void
  • Resumes the calculation of formulas.

    If calculations were not suspended when this is called, it will have no effect.

    For each call to suspendCalculations, a call to ResumeCalculations must be made. As soon as the number of calls to ResumeCalculations equals the number of calls to SuspendCalculations, calculations will be resumed.

    see

    suspendCalculations

    Returns void

save

  • save(saveOptions: WorkbookSaveOptions, successCallback: function, failCallback: function): void
  • save(successCallback: function, failCallback: function): void
  • Writes the workbook to a Uint8Array.

    The workbook will be written in the format specified by the currentFormat.

    throws

    [[InvalidOperationException]] The workbook has no worksheets in its worksheets collection.

    throws

    [[InvalidOperationException]] No worksheet in this workbook's Worksheets collection has its DisplayOptions.Visibility set to Visible.

    throws

    [[InvalidOperationException]] A CustomView in the workbook's customViews collection has all worksheets hidden. At least one worksheet must be visible in all custom views.

    see

    isSaving

    Parameters

    • saveOptions: WorkbookSaveOptions

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

    • successCallback: function

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

        • (arg1: any): void
        • Parameters

          • arg1: any

          Returns void

    • failCallback: function

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

        • (arg1: BaseError): void
        • Parameters

          • arg1: BaseError

          Returns void

    Returns void

  • Writes the workbook to a Uint8Array.

    The workbook will be written in the format specified by the currentFormat.

    throws

    [[InvalidOperationException]] The workbook has no worksheets in its worksheets collection.

    throws

    [[InvalidOperationException]] No worksheet in this workbook's Worksheets collection has its DisplayOptions.Visibility set to Visible.

    throws

    [[InvalidOperationException]] A CustomView in the workbook's customViews collection has all worksheets hidden. At least one worksheet must be visible in all custom views.

    see

    isSaving

    Parameters

    • successCallback: function

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

        • (arg1: any): void
        • Parameters

          • arg1: any

          Returns void

    • failCallback: function

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

        • (arg1: BaseError): void
        • Parameters

          • arg1: BaseError

          Returns void

    Returns void

setCurrentFormat

  • Sets the current format of the workbook.

    throws

    InvalidEnumArgumentException 'format' is not defined in the WorkbookFormat enumeration.

    throws

    [[InvalidOperationException]] The workbook already contains data which exceeds the limits imposed by 'format'.

    see

    currentFormat

    Parameters

    • format: WorkbookFormat

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

    Returns void

sheets

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

    throws

    [[ArgumentOutOfRangeException]] 'index' is less than zero or 'index' is greater than or equal to count.

    Parameters

    • index: number

      The zero-based index of the sheet to get.

    Returns Sheet

  • Gets the sheet with the specified name.

    Sheet names are compared case-insensitively.

    The sheet with the specified name.
    throws

    [[InvalidOperationException]] A sheet with the specified name does not exist in the collection.

    see

    Sheet.name

    Parameters

    • name: string

      The name of the sheet to get.

    Returns Sheet

  • Gets the collection of sheets in the workbook.

    Use WindowOptions.SelectedSheet to set the selected sheet. The selected sheet is the sheet seen when the workbook is opened in Microsoft Excel.

    The collection of worksheets in the workbook.

    Returns SheetCollection

standardTableStyles

  • Gets the WorksheetTableStyle at the specified index.

    throws

    [[ArgumentOutOfRangeException]] 'index' is less than 0 or greater than or equal to count.

    Parameters

    • index: number

      The index at which to get the WorksheetTableStyle.

    Returns WorksheetTableStyle

    The WorksheetTableStyle instance at the specified index.

  • Gets the WorksheetTableStyle with the specified name.

    Table style names are compared case-insensitively.

    Parameters

    • name: string

      The name of the WorksheetTableStyle to find.

    Returns WorksheetTableStyle

    The WorksheetTableStyle instance with the specified name or null if a table style with that name does not exist.

  • Gets the read-only collection of preset table styles in the workbook.

    see

    defaultTableStyle

    see

    customTableStyles

    Returns StandardTableStyleCollection

styles

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

    throws

    [[ArgumentOutOfRangeException]] 'index' is less than zero or 'index' is greater than or equal to count.

    Parameters

    • index: number

      The zero-based index of the style to get.

    Returns WorkbookStyle

  • Gets the style with the specified name.

    Style names are compared case-insensitively.

    The style with the specified name or null if no style with that name exists.
    throws

    [[ArgumentNullException]] 'name' is null.

    Parameters

    • name: string

      The name of the style to get.

    Returns WorkbookStyle

  • Gets the collection of custom styles in the workbook.

    Use this collection to add custom styles to Excel workbook. The user can apply those styles to different parts of excel workbook and thereby set complex formatting with ease.

    The collection of custom styles in the workbook.
    see

    WorkbookStyle

    Returns WorkbookStyleCollection

suspendCalculations

  • suspendCalculations(): void
  • Temporarily suspends the calculation of formulas.

    This should be used when adding many formulas or modifying large amounts of data on a workbook at once so formulas are not calculated each time cells are dirtied.

    For each call to SuspendCalculations, a call to resumeCalculations must be made. As soon as the number of calls to ResumeCalculations equals the number of calls to SuspendCalculations, calculations will be resumed.

    see

    resumeCalculations

    Returns void

unprotect

  • unprotect(): void

worksheets

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

    throws

    [[ArgumentOutOfRangeException]] 'index' is less than zero or 'index' is greater than or equal to count.

    Parameters

    • index: number

      The zero-based index of the worksheet to get.

    Returns Worksheet

  • Gets the worksheet with the specified name.

    Worksheet names are compared case-insensitively.

    The worksheet with the specified name.
    throws

    [[InvalidOperationException]] A worksheet with the specified name does not exist in the collection.

    see

    Sheet.name

    Parameters

    • name: string

      The name of the worksheet to get.

    Returns Worksheet

  • Gets the collection of worksheets in the workbook.

    Use WindowOptions.SelectedWorksheet to set the selected worksheet. The selected worksheet is the worksheet seen when the workbook is opened in Microsoft Excel.

    The collection of worksheets in the workbook.

    Returns WorksheetCollection

Static compare

  • compare(item1: any, item2: any): number
  • Parameters

    • item1: any
    • item2: any

    Returns number

Static compareSimple

  • compareSimple(item1: any, item2: any): number
  • Parameters

    • item1: any
    • item2: any

    Returns number

Static equalsSimple

  • equalsSimple(item1: any, item2: any): boolean
  • Parameters

    • item1: any
    • item2: any

    Returns boolean

Static equalsStatic

  • equalsStatic(a: any, b: any): boolean
  • Parameters

    • a: any
    • b: any

    Returns boolean

Static getArrayOfProperties

  • getArrayOfProperties(obj: any): any[]
  • Parameters

    • obj: any

    Returns any[]

Static getArrayOfValues

  • getArrayOfValues(obj: any): any[]
  • Parameters

    • obj: any

    Returns any[]

Static getHashCodeStatic

  • getHashCodeStatic(obj: any): number
  • Parameters

    • obj: any

    Returns number

Static getMaxColumnCount

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

    Parameters

    Returns number

    The maximum number of columns supported by the format.

Static getMaxRowCount

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

    Parameters

    Returns number

    The maximum number of rows supported by the format.

Static getWorkbookFormat

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

    Parameters

    • fileName: string

      The filename of an excel file.

    Returns WorkbookFormat | null

    The workbook format based on the file extension of the file, or null if the correct format cannot be determined.

Static isWorkbookEncrypted

  • isWorkbookEncrypted(stream: string | Uint8Array): boolean
  • Determines whether the workbook in the specified stream is encrypted with an open password.

    throws

    [[ArgumentNullException]] Occurs when 'stream' is null.

    Parameters

    • stream: string | Uint8Array

      The stream to check for encryption.

    Returns boolean

    True if the stream contains a workbook which is encrypted; False otherwise

Static load

  • load(data: string | Uint8Array, loadOptions: WorkbookLoadOptions, successCallback: function, failCallback: function): void
  • load(data: string | Uint8Array, successCallback: function, failCallback: function): void
  • Loads a workbook from a Uint8Array or base64 encoded string.

    When loading the workbook, the contents of the file will be examined to try to determine the format. The currentFormat of the resulting workbook will indicate the format the workbook was loaded from.

    throws

    [[ArgumentException]] 'data' does not contain valid Microsoft Excel file contents.

    throws

    [[ArgumentException]] The file format cannot be determined from the specified stream.

    throws

    [[InvalidOperationException]] The format of the workbook data is in an unsupported format.

    throws

    NotSupportedException The workbook being loaded is in an Excel 2007 format and the CLR 2.0 Excel assembly is being used. The overload taking an [[IPackageFactory]] must be used in this case so the Excel 2007 file package can be accessed.

    throws

    DocumentEncryptedException Occurs when the workbook is encrypted.

    Parameters

    • data: string | Uint8Array

      The data from which to load the workbook.

    • loadOptions: WorkbookLoadOptions

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

    • successCallback: function

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

    • failCallback: function

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

        • (arg1: BaseError): void
        • Parameters

          • arg1: BaseError

          Returns void

    Returns void

    The workbook loaded from the stream.

  • Loads a workbook from a Uint8Array or base64 encoded string.

    When loading the workbook, the contents of the file will be examined to try to determine the format. The currentFormat of the resulting workbook will indicate the format the workbook was loaded from.

    throws

    [[ArgumentException]] 'data' does not contain valid Microsoft Excel file contents.

    throws

    [[ArgumentException]] The file format cannot be determined from the specified stream.

    throws

    [[InvalidOperationException]] The format of the workbook data is in an unsupported format.

    throws

    NotSupportedException The workbook being loaded is in an Excel 2007 format and the CLR 2.0 Excel assembly is being used. The overload taking an [[IPackageFactory]] must be used in this case so the Excel 2007 file package can be accessed.

    throws

    DocumentEncryptedException Occurs when the workbook is encrypted.

    Parameters

    • data: string | Uint8Array

      The data from which to load the workbook.

    • successCallback: function

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

    • failCallback: function

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

        • (arg1: BaseError): void
        • Parameters

          • arg1: BaseError

          Returns void

    Returns void

    The workbook loaded from the stream.

Static referenceEquals

  • referenceEquals(a: any, b: any): boolean
  • Parameters

    • a: any
    • b: any

    Returns boolean

Static staticInit

  • staticInit(): void
  • Returns void