Class Workbook
- Namespace
- SheetStream
- Assembly
- SheetStream.dll
The logical workbook: a collection of worksheets plus the style sheet, shared string table, defined names and document properties they share. There is exactly one workbook per ExcelPackage.
public sealed class Workbook
- Inheritance
-
Workbook
- Inherited Members
Properties
DefinedNames
Named ranges and named formulas.
public DefinedNameCollection DefinedNames { get; }
Property Value
Package
The package this workbook is written into.
public ExcelPackage Package { get; }
Property Value
Properties
Document properties (title, author, company...).
public WorkbookProperties Properties { get; }
Property Value
SharedStrings
The shared string table used by every sheet. Exposed for diagnostics (counts).
public SharedStringTable SharedStrings { get; }
Property Value
Styles
Registry of cell styles. Create styles here and pass them to the cell-writing methods.
public StyleSheet Styles { get; }
Property Value
Worksheets
The worksheets, in the order they appear in Excel's tab strip.
public WorksheetCollection Worksheets { get; }
Property Value
Methods
Protect(string?, bool, bool)
Protects the workbook structure so sheets cannot be added, deleted, renamed, moved, hidden or unhidden without the password. Cell editing is controlled per sheet with Protect(string?, Action<SheetProtectionOptions>?).
public void Protect(string? password = null, bool lockStructure = true, bool lockWindows = false)