Method | Description | |
---|---|---|
AddStyle ( Style style, bool distinct ) : Style |
Adds a style to the style sheet of the workbook
|
|
AddWorksheet ( string name ) : void |
Adding a new Worksheet
|
|
RemoveStyle ( Style style ) : void |
Removes the passed style from the style sheet
|
|
RemoveStyle ( Style style, bool onlyIfUnused ) : void |
Removes the defined style from the style sheet of the workbook
|
|
RemoveStyle ( string styleName ) : void |
Removes the defined style from the style sheet of the workbook
|
|
RemoveStyle ( string styleName, bool onlyIfUnused ) : void |
Removes the defined style from the style sheet of the workbook
|
|
RemoveWorksheet ( string name ) : void |
Removes the defined worksheet
|
|
ReorganizeStyles ( List |
Method to prepare the styles before saving the workbook. Don't use the method otherwise. Styles will be reordered and probably removed from the style sheet This method is for internal use but must be public. Otherwise it's not possible to access it from low level methods. Don't use it |
|
ResolveMergedCells ( ) : void |
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.
|
|
Save ( ) : void |
Saves the workbook
|
|
SaveAs ( string filename ) : void |
Saves the workbook with the defined name
|
|
SetCurrentWorksheet ( string name ) : Worksheet |
Sets the current worksheet
|
|
SetSelectedWorksheet ( Worksheet worksheet ) : void |
Sets the selected worksheet in the output workbook This method does not set the current worksheet while design time. Use SetCurrentWorksheet instead for this |
|
SetSelectedWorksheet ( int worksheetIndex ) : void |
Sets the selected worksheet in the output workbook This method does not set the current worksheet while design time. Use SetCurrentWorksheet instead for this |
|
SetWorkbookProtection ( bool state, bool protectWindows, bool protectStructure, string password ) : void |
Sets or removes the workbook protection. If protectWindows and protectStructure are both false, the workbook will not be protected
|
|
Workbook ( bool createWorkSheet ) : System |
Default Constructor with additional parameter to create a default worksheet
|
|
Workbook ( string filename, string sheetName ) : System |
Constructor with filename ant the name of the first worksheet
|
public AddStyle ( Style style, bool distinct ) : Style | ||
style | Style | Style to add |
distinct | bool | If true, the passed style will be replaced by an identical style if existing. Otherwise an exception will be thrown in case of a duplicate |
return | Style |
public AddWorksheet ( string name ) : void | ||
name | string | Name of the new worksheet |
return | void |
public RemoveStyle ( Style style ) : void | ||
style | Style | Style to remove |
return | void |
public RemoveStyle ( Style style, bool onlyIfUnused ) : void | ||
style | Style | Style to remove |
onlyIfUnused | bool | If true, the style will only be removed if not used in any cell |
return | void |
public RemoveStyle ( string styleName ) : void | ||
styleName | string | Name of the style to be removed |
return | void |
public RemoveStyle ( string styleName, bool onlyIfUnused ) : void | ||
styleName | string | Name of the style to be removed |
onlyIfUnused | bool | If true, the style will only be removed if not used in any cell |
return | void |
public RemoveWorksheet ( string name ) : void | ||
name | string | Name of the worksheet |
return | void |
public ReorganizeStyles ( List |
||
borders | List |
Out parameter for a sorted list of Style.Border objects |
fills | List |
Out parameter for a sorted list of Style.Fill objects |
fonts | List |
Out parameter for a sorted list of Style.Font objects |
numberFormats | List |
Out parameter for a sorted list of Style.NumberFormat objects |
cellXfs | List |
Out parameter for a sorted list of Style.CellXf objects |
return | void |
public SaveAs ( string filename ) : void | ||
filename | string | filename of the saved workbook |
return | void |
public SetCurrentWorksheet ( string name ) : Worksheet | ||
name | string | Name of the worksheet |
return | Worksheet |
public SetSelectedWorksheet ( Worksheet worksheet ) : void | ||
worksheet | Worksheet | Worksheet object (must be in the collection of worksheets) |
return | void |
public SetSelectedWorksheet ( int worksheetIndex ) : void | ||
worksheetIndex | int | Zero-based worksheet index |
return | void |
public SetWorkbookProtection ( bool state, bool protectWindows, bool protectStructure, string password ) : void | ||
state | bool | If true, the workbook will be protected, otherwise not |
protectWindows | bool | If true, the windows will be locked if the workbook is protected |
protectStructure | bool | If true, the structure will be locked if the workbook is protected |
password | string | Optional password. If null or empty, no password will be set in case of protection |
return | void |
public Workbook ( bool createWorkSheet ) : System | ||
createWorkSheet | bool | If true, a default worksheet will be crated and set as default worksheet |
return | System |
public Workbook ( string filename, string sheetName ) : System | ||
filename | string | Filename of the workbook |
sheetName | string | Name of the first worksheet |
return | System |