Workbook Class

NanoXLSX

NanoXLSX

Workbook Class

Class representing a workbook
Inheritance Hierarchy
SystemObject  NanoXLSXWorkbook

Namespace:  NanoXLSX
Assembly:  NanoXLSX (in NanoXLSX.dll) Version: 1.2.3.0 (1.2.3)
Syntax
C#
public class Workbook

The Workbook type exposes the following members.

Constructors
  NameDescription
Public methodWorkbook(Boolean)
Constructor with additional parameter to create a default worksheet. This constructor can be used to define a workbook that is saved as stream
Public methodWorkbook(String)
Constructor with additional parameter to create a default worksheet with the specified name. This constructor can be used to define a workbook that is saved as stream
Public methodWorkbook(String, String)
Constructor with filename ant the name of the first worksheet
Public methodWorkbook(String, String, Boolean)
Constructor with filename ant the name of the first worksheet
Top
Properties
  NameDescription
Public propertyCurrentWorksheet
Gets the current worksheet
Public propertyFilename
Gets or sets the filename of the workbook
Public propertyLockStructureIfProtected
Gets whether the structure are locked if workbook is protected
Public propertyLockWindowsIfProtected
Gets whether the windows are locked if workbook is protected
Public propertySelectedWorksheet
Gets the selected worksheet. The selected worksheet is not the current worksheet while design time but the selected sheet in the output file
Public propertyStyles
Gets the style manager of this workbook
Public propertyUseWorkbookProtection
Gets or sets whether the workbook is protected
Public propertyWorkbookMetadata
Meta data object of the workbook
Public propertyWorkbookProtectionPassword
Gets the password used for workbook protection
Public propertyWorksheets
Gets the list of worksheets in the workbook
Public propertyWS
Gets the shortener object for the current worksheet
Top
Methods
  NameDescription
Public methodAddStyle
Adds a style to the style manager
Public methodAddStyleComponent
Adds a style component to a style
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 methodEquals
Determines whether the specified Object is equal to the current Object.
(Inherited from Object.)
Protected methodFinalize
Allows an object to try to free resources and perform other cleanup operations before it is reclaimed by garbage collection.
(Inherited from Object.)
Public methodGetHashCode
Serves as a hash function for a particular type.
(Inherited from Object.)
Public methodGetType
Gets the Type of the current instance.
(Inherited from Object.)
Private methodInit
Init method called in the constructors
Public methodStatic memberLoad(Stream)
Loads a workbook from a stream
Public methodStatic memberLoad(String)
Loads a workbook from a file
Protected methodMemberwiseClone
Creates a shallow copy of the current Object.
(Inherited from Object.)
Public methodRemoveStyle(String)
Removes the defined style from the style sheet of the workbook
Public methodRemoveStyle(Style)
Removes the passed style from the style sheet
Public methodRemoveStyle(String, Boolean)
Removes the defined style from the style sheet of the workbook
Public methodRemoveStyle(Style, Boolean)
Removes the defined style from the style sheet of the workbook
Public methodRemoveWorksheet
Removes the defined worksheet
Public 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.
Public methodSave
Saves the workbook
Public methodSaveAs
Saves the workbook with the defined name
Public methodSaveAsStream
Save the workbook to a writable stream
Public methodSetCurrentWorksheet
Sets the current worksheet
Public methodSetSelectedWorksheet(Int32)
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 methodToString
Returns a string that represents the current object.
(Inherited from Object.)
Top
See Also