Class Sheet
Base class for all sheet types in a workbook, including worksheets and chartsheets.
Inherited Members
Namespace: DRIT.Spreadsheet
Assembly: DRIT.Spreadsheet.dll
Syntax
public abstract class Sheet
Remarks
The Sheet class provides common functionality for all sheet types,
including name, visibility, and protection settings.
Derived classes include Worksheet for data sheets and Chartsheet for chart-only sheets.
Constructors
Sheet()
Initializes a new Sheet for the supplied workbook data.
Declaration
protected Sheet()
Remarks
The Sheet class provides common functionality for all sheet types,
including name, visibility, and protection settings.
Derived classes include Worksheet for data sheets and Chartsheet for chart-only sheets.
Sheet(Workbook)
Initializes a new Sheet for the supplied workbook data.
Declaration
protected Sheet(Workbook workbook)
Parameters
| Type | Name | Description |
|---|---|---|
| Workbook | workbook |
Remarks
The Sheet class provides common functionality for all sheet types,
including name, visibility, and protection settings.
Derived classes include Worksheet for data sheets and Chartsheet for chart-only sheets.
Sheet(Workbook, string)
Initializes a new Sheet for the supplied workbook data.
Declaration
protected Sheet(Workbook workbook, string name)
Parameters
| Type | Name | Description |
|---|---|---|
| Workbook | workbook | |
| string | name |
Remarks
The Sheet class provides common functionality for all sheet types,
including name, visibility, and protection settings.
Derived classes include Worksheet for data sheets and Chartsheet for chart-only sheets.
Properties
AllowEditRanges
Gets the collection of protected ranges that can be edited by specific users when the sheet is protected.
Declaration
public ProtectedRangeCollection AllowEditRanges { get; }
Property Value
| Type | Description |
|---|---|
| ProtectedRangeCollection |
Remarks
The Sheet class provides common functionality for all sheet types,
including name, visibility, and protection settings.
Derived classes include Worksheet for data sheets and Chartsheet for chart-only sheets.
Name
Get or set the name of the sheet.
Declaration
public string Name { get; set; }
Property Value
| Type | Description |
|---|---|
| string |
Remarks
The Sheet class provides common functionality for all sheet types,
including name, visibility, and protection settings.
Derived classes include Worksheet for data sheets and Chartsheet for chart-only sheets.
Exceptions
| Type | Condition |
|---|---|
| NullReferenceException | |
| ArgumentException |
Properties
Get or set the properties of the worksheet.
Declaration
public SheetProperties Properties { get; set; }
Property Value
| Type | Description |
|---|---|
| SheetProperties |
Remarks
The Sheet class provides common functionality for all sheet types,
including name, visibility, and protection settings.
Derived classes include Worksheet for data sheets and Chartsheet for chart-only sheets.
Protection
Get or set the protection of the worksheet.
Declaration
public SheetProtection Protection { get; }
Property Value
| Type | Description |
|---|---|
| SheetProtection |
Remarks
The Sheet class provides common functionality for all sheet types,
including name, visibility, and protection settings.
Derived classes include Worksheet for data sheets and Chartsheet for chart-only sheets.
View
Get or set the view of the worksheet
Declaration
public SheetView View { get; protected set; }
Property Value
| Type | Description |
|---|---|
| SheetView |
Remarks
The Sheet class provides common functionality for all sheet types,
including name, visibility, and protection settings.
Derived classes include Worksheet for data sheets and Chartsheet for chart-only sheets.
Visibility
Exposes the visibility associated with Sheet.
Declaration
public SheetState Visibility { get; set; }
Property Value
| Type | Description |
|---|---|
| SheetState | The visibility returned by the operation. |
Remarks
The Sheet class provides common functionality for all sheet types,
including name, visibility, and protection settings.
Derived classes include Worksheet for data sheets and Chartsheet for chart-only sheets.
Workbook
Get the workbook which contains the current sheet.
Declaration
public Workbook Workbook { get; }
Property Value
| Type | Description |
|---|---|
| Workbook |
Remarks
The Sheet class provides common functionality for all sheet types,
including name, visibility, and protection settings.
Derived classes include Worksheet for data sheets and Chartsheet for chart-only sheets.