Static
$tStatic
Readonly
maxStatic
Readonly
maxStatic
Readonly
maxStatic
Readonly
maxStatic
Readonly
maxStatic
Readonly
maxStatic
Readonly
maxStatic
nextGets 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.InvalidEnumArgumentException The assigned value is not defined in the cellReferenceMode enumeration.
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.Gets the current format of the workbook. This is the format which will be used when saving and imposing format restrictions.
Gets or sets the date system used internally by Microsoft Excel. The date system used internally by Microsoft Excel.
InvalidEnumArgumentException The assigned value is not defined in the dateSystem enumeration.
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.
ArgumentException The specified value is not in the customTableStyles or standardTableStyles collections.
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.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.
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.
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.
Gets the value indicating whether the Workbook is currently being saved.
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
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.Gets the maximum number of columns allowed in each worksheet based on the currentFormat.
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.ArgumentOutOfRangeException The assigned value is outside the valid range of 1 and 32767.
Gets the maximum number of rows allowed in each worksheet based on the currentFormat.
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.InvalidEnumArgumentException The assigned value is not defined in the enumeration.
Returns an object that provides information used when the Workbook has been protected.
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.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.Gets or sets the Dpi to use when calculating row and column sizes for the workbook. If empty, the system Dpi will be used.
ArgumentException Occurs when the specified value is not empty and does not have two positive values.
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.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.
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.Static
systemConverts 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.
The number of pixels equivalent to the 'characterWidth256ths' value.
The number of units of 1/256s of the average character width.
Clears all external data connections from the Workbook.
Clears all pivot tables and associated slicers from the Workbook.
Clears all vba information from the Workbook.
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:
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.
The created excel font object.
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:
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.
The cell format which was created.
Gets the WorksheetTableStyle at the specified index.
ArgumentOutOfRangeException 'index' is less than 0 or greater than or equal to count.
The WorksheetTableStyle instance at the specified index.
The index at which to get the WorksheetTableStyle.
Gets the WorksheetTableStyle with the specified name.
Table style names are compared case-insensitively.
The WorksheetTableStyle instance with the specified name or null if a table style with that name does not exist.
The name of the WorksheetTableStyle to find.
Gets the collection of custom table styles in the workbook.
Gets the custom view at the specified index. The custom view at the specified index.
ArgumentOutOfRangeException 'index' is less than zero or 'index' is greater than or equal to count.
The zero-based index of the custom view to get.
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.Gets the table with the specified name.
Table names are compared case-insensitively.
A WorksheetTable instance if a table exists with the specified name; Otherwise null.
The name of the table to get.
Gets a value indicating whether the specified function will be recognized and solved by Microsoft Excel when the workbook is saved out.
True if the function will be recognized in Microsoft Excel; False otherwise.
The case-insensitive name of the function.
Gets the named reference at the specified index. The named reference at the specified index.
ArgumentOutOfRangeException 'index' is less than zero or 'index' is greater than or equal to count.
The zero-based index of the named reference to get.
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.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.
ArgumentOutOfRangeException 'index' is less than 0 or greater than 55.
ArgumentException The value assigned is an empty color, a system color, or is not opaque.
The index of the color to get or set in the palette.
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.
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.
The number of units of 1/256s of the average character width equivalent to the 'pixels' value.
The number of pixels.
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.
Optional boolean indicating the new value for the WorkbookProtection.allowEditStructure.
Optional boolean indicating the new value for the WorkbookProtection.allowEditWindows.
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.
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.
True to recalculate all formulas on the workbook regardless of whether they had a pending evaluation. False to only calculate dirty formulas.
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.
True to recalculate all formulas on the workbook regardless of whether they had a pending evaluation. False to only calculate dirty formulas.
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.
Returns true if the type was registered successfully, else false if the registration failed
User defined function instance to register
Registers a custom function.
Returns true if the type was registered successfully, else false if the registration failed
The name of the function
The minimum number of arguments
The maximum number of arguments
The function used to perform the calculation that gets an ExcelCalcNumberStack and the number of arguments on the stack for the function and returns an ExcelCalcValue that represents the result of the formula
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.
Writes the workbook to a Uint8Array.
The workbook will be written in the format specified by the currentFormat.
InvalidOperationException The workbook has no worksheets in its worksheets collection.
InvalidOperationException No worksheet in this workbook's Worksheets collection has its DisplayOptions.Visibility set to Visible.
InvalidOperationException A CustomView in the workbook's customViews collection has all worksheets hidden. At least one worksheet must be visible in all custom views.
The options to use to save the stream or null to use the default options.
The function to call when the Workbook has been successfully saved into a Uint8Array or base-64 encoded string.
The function to call when saving the Workbook has caused an error.
Writes the workbook to a Uint8Array.
The workbook will be written in the format specified by the currentFormat.
InvalidOperationException The workbook has no worksheets in its worksheets collection.
InvalidOperationException No worksheet in this workbook's Worksheets collection has its DisplayOptions.Visibility set to Visible.
InvalidOperationException A CustomView in the workbook's customViews collection has all worksheets hidden. At least one worksheet must be visible in all custom views.
The function to call when the Workbook has been successfully saved into a Uint8Array or base-64 encoded string.
The function to call when saving the Workbook has caused an error.
Sets the current format of the workbook.
InvalidEnumArgumentException 'format' is not defined in the WorkbookFormat enumeration.
InvalidOperationException The workbook already contains data which exceeds the limits imposed by 'format'.
The file format to use when imposing format restrictions and saving.
Gets the sheet at the specified index. The sheet at the specified index.
ArgumentOutOfRangeException 'index' is less than zero or 'index' is greater than or equal to count.
The zero-based index of the sheet to get.
Gets the sheet with the specified name.
Sheet names are compared case-insensitively.
The sheet with the specified name.InvalidOperationException A sheet with the specified name does not exist in the collection.
The name of the sheet to get.
Gets the collection of sheets in the workbook.
Use
Gets the WorksheetTableStyle at the specified index.
ArgumentOutOfRangeException 'index' is less than 0 or greater than or equal to count.
The WorksheetTableStyle instance at the specified index.
The index at which to get the WorksheetTableStyle.
Gets the WorksheetTableStyle with the specified name.
Table style names are compared case-insensitively.
The WorksheetTableStyle instance with the specified name or null if a table style with that name does not exist.
The name of the WorksheetTableStyle to find.
Gets the read-only collection of preset table styles in the workbook.
Gets the style at the specified index. The style at the specified index.
ArgumentOutOfRangeException 'index' is less than zero or 'index' is greater than or equal to count.
The zero-based index of the style to get.
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.ArgumentNullException 'name' is null.
The name of the style to get.
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.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.
Gets the worksheet at the specified index. The worksheet at the specified index.
ArgumentOutOfRangeException 'index' is less than zero or 'index' is greater than or equal to count.
The zero-based index of the worksheet to get.
Gets the worksheet with the specified name.
Worksheet names are compared case-insensitively.
The worksheet with the specified name.InvalidOperationException A worksheet with the specified name does not exist in the collection.
The name of the worksheet to get.
Gets the collection of worksheets in the workbook.
Use
Static
compareStatic
compareStatic
equalsStatic
equalsStatic
getStatic
getStatic
getStatic
getReturns the number of columns that are supported by the specified format.
The maximum number of columns supported by the format.
The format used by the workbook.
Static
getReturns the number of rows that are supported by the specified format.
The maximum number of rows supported by the format.
The format used by the workbook.
Static
getReturns the WorkbookFormat based on the file extension of the specified file.
The workbook format based on the file extension of the file, or null if the correct format cannot be determined.
The filename of an excel file.
Static
isDetermines whether the workbook in the specified stream is encrypted with an open password.
ArgumentNullException Occurs when 'stream' is null.
True if the stream contains a workbook which is encrypted; False otherwise
The stream to check for encryption.
Static
loadLoads a workbook from a File.
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.
ArgumentException 'file' does not contain valid Microsoft Excel file contents.
ArgumentException The file format cannot be determined from the specified stream.
InvalidOperationException The format of the workbook data is in an unsupported format.
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.
DocumentEncryptedException Occurs when the workbook is encrypted.
The workbook loaded from the stream.
The file from which to load the workbook.
The options to use to load the stream or null to use the default options.
The function to call when the Workbook has been successfully loaded.
The function to call when loading the Workbook has resulted in an error.
Loads a workbook from a File.
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.
ArgumentException 'file' does not contain valid Microsoft Excel file contents.
ArgumentException The file format cannot be determined from the specified stream.
InvalidOperationException The format of the workbook data is in an unsupported format.
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.
DocumentEncryptedException Occurs when the workbook is encrypted.
The workbook loaded from the stream.
The file from which to load the workbook.
The function to call when the Workbook has been successfully loaded.
The function to call when loading the Workbook has resulted in an error.
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.
ArgumentException 'data' does not contain valid Microsoft Excel file contents.
ArgumentException The file format cannot be determined from the specified stream.
InvalidOperationException The format of the workbook data is in an unsupported format.
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.
DocumentEncryptedException Occurs when the workbook is encrypted.
The workbook loaded from the stream.
The data from which to load the workbook.
The options to use to load the stream or null to use the default options.
The function to call when the Workbook has been successfully loaded.
The function to call when loading the Workbook has resulted in an error.
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.
ArgumentException 'data' does not contain valid Microsoft Excel file contents.
ArgumentException The file format cannot be determined from the specified stream.
InvalidOperationException The format of the workbook data is in an unsupported format.
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.
DocumentEncryptedException Occurs when the workbook is encrypted.
The workbook loaded from the stream.
The data from which to load the workbook.
The function to call when the Workbook has been successfully loaded.
The function to call when loading the Workbook has resulted in an error.
Static
referenceStatic
static
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