Click or drag to resize
PicoXLSX

Workbook Methods

The Workbook type exposes the following members.

Methods
 NameDescription
Public methodAddMruColor Adds a color value (HEX; 6-digit RGB or 8-digit ARGB) to the MRU list
Public methodAddStyleObsolete.
Adds a style to the style repository. This method is deprecated since it has no direct impact on the generated file
Public methodAddStyleComponentObsolete.
Adds a style component to a style. This method is deprecated since it has no direct impact on the generated file
Public methodAddWorksheet(String) Adding a new Worksheet. The new worksheet will be defined as current worksheet
Public methodAddWorksheet(Worksheet) Adding a new Worksheet. The new worksheet will be defined as current worksheet
Public methodAddWorksheet(String, Boolean) Adding a new Worksheet with a sanitizing option. The new worksheet will be defined as current worksheet
Public methodAddWorksheet(Worksheet, Boolean) Adding a new Worksheet. The new worksheet will be defined as current worksheet
Public methodClearMruColors Clears the MRU color list
Public methodCopyWorksheetIntoThis(Int32, String, Boolean) Copies a worksheet of the current workbook by its index
Public methodCopyWorksheetIntoThis(String, String, Boolean) Copies a worksheet of the current workbook by its name
Public methodCopyWorksheetIntoThis(Worksheet, String, Boolean) Copies a worksheet of any workbook into the current workbook
Public methodCopyWorksheetTo(Int32, String, Workbook, Boolean) Copies a worksheet of the current workbook by its index into another workbook
Public methodCopyWorksheetTo(String, String, Workbook, Boolean) Copies a worksheet of the current workbook by its name into another workbook
Public methodStatic memberCopyWorksheetTo(Worksheet, String, Workbook, Boolean) Copies a worksheet of any workbook into the another workbook
Public methodEqualsDetermines whether the specified object is equal to the current object.
(Inherited from Object)
Protected methodFinalizeAllows an object to try to free resources and perform other cleanup operations before it is reclaimed by garbage collection.
(Inherited from Object)
Public methodGetHashCodeServes as the default hash function.
(Inherited from Object)
Public methodGetMruColors Gets the MRU color list
Private methodGetNextWorksheetId Gets the next free worksheet ID
Public methodGetTypeGets the Type of the current instance.
(Inherited from Object)
Public methodGetWorksheet(Int32) Gets a worksheet from this workbook by index
Public methodGetWorksheet(String) Gets a worksheet from this workbook by name
Private methodInit Init method called in the constructors
Protected methodMemberwiseCloneCreates a shallow copy of the current Object.
(Inherited from Object)
Public methodRemoveStyle(String)Obsolete.
Removes the defined style from the style sheet of the workbook. This method is deprecated since it has no direct impact on the generated file
Public methodRemoveStyle(Style)Obsolete.
Removes the passed style from the style sheet. This method is deprecated since it has no direct impact on the generated file
Public methodRemoveStyle(String, Boolean)Obsolete.
Removes the defined style from the style sheet of the workbook. This method is deprecated since it has no direct impact on the generated file
Public methodRemoveStyle(Style, Boolean)Obsolete.
Removes the defined style from the style sheet of the workbook
Public methodRemoveWorksheet(Int32) Removes the defined worksheet based on its index. If the worksheet is the current or selected worksheet, the current and / or the selected worksheet will be set to the last worksheet of the workbook Removes the defined worksheet based on its index. If the worksheet is the current or selected worksheet, the current and / or the selected worksheet will be set to the last worksheet of the workbook
Public methodRemoveWorksheet(String) Removes the defined worksheet based on its name. If the worksheet is the current or selected worksheet, the current and / or the selected worksheet will be set to the last worksheet of the workbook Removes the defined worksheet based on its name. If the worksheet is the current or selected worksheet, the current and / or the selected worksheet will be set to the last worksheet of the workbook
Private methodRemoveWorksheet(Int32, Boolean) Removes the worksheet at the defined index and relocates current and selected worksheet references
Protected methodResolveMergedCells Method to resolve all merged cells in all worksheets. Only the value of the very first cell of the locked cells range will be visible. The other values are still present (set to EMPTY) but will not be stored in the worksheet.
This is an internal method. There is no need to use it
Public methodSave Saves the workbook
Public methodSaveAs Saves the workbook with the defined name
Public methodSaveAsAsync Saves the workbook with the defined name asynchronous
Public methodSaveAsStream Save the workbook to a writable stream
Public methodSaveAsStreamAsync Save the workbook to a writable stream asynchronous
Public methodSaveAsync Saves the workbook asynchronous
Public methodSetCurrentWorksheet(Int32) Sets the current worksheet
Public methodSetCurrentWorksheet(String) Sets the current worksheet
Public methodSetCurrentWorksheet(Worksheet) Sets the current worksheet
Public methodSetSelectedWorksheet(Int32) Sets the selected worksheet in the output workbook
Public methodSetSelectedWorksheet(String) Sets the selected worksheet in the output workbook
Public methodSetSelectedWorksheet(Worksheet) Sets the selected worksheet in the output workbook
Public methodSetWorkbookProtection Sets or removes the workbook protection. If protectWindows and protectStructure are both false, the workbook will not be protected
Public methodToStringReturns a string that represents the current object.
(Inherited from Object)
Protected methodValidateWorksheets Validates the worksheets regarding several conditions that must be met:
- At least one worksheet must be defined
- A hidden worksheet cannot be the selected one
- At least one worksheet must be visible
If one of the conditions is not met, an exception is thrown
Top
See Also