Class Worksheet
Represents an Excel worksheet
Inheritance
System.Object
Worksheet
Assembly: DRIT.Spreadsheet.dll
Syntax
public class Worksheet : Sheet, IWorksheet
Properties
ActiveCell
Get or set the active cell of the worksheet which receives keyboard message.
Declaration
public Cell ActiveCell { get; set; }
Property Value
ActiveXControls
Declaration
public WorksheetActiveXControlCollection ActiveXControls { get; }
Property Value
AutoFilter
Get or set the auto filter of the worksheet
Declaration
public AutoFilter AutoFilter { get; }
Property Value
CalculationProperties
Declaration
public WorksheetCalculationProperties CalculationProperties { get; }
Property Value
CellWatches
Declaration
public List<CellWatch> CellWatches { get; set; }
Property Value
Charts
Declaration
public WorksheetChartsCollection Charts { get; }
Property Value
ColumnBreaks
Declaration
public PageBreakCollection ColumnBreaks { get; }
Property Value
Columns
Get the collection of columns of the worksheet
Declaration
public ColumnCollection Columns { get; }
Property Value
Declaration
public CommentCollection Comments { get; }
Property Value
Declaration
public ConditionalFormattingCollection ConditionalFormattings { get; }
Property Value
CustomProperties
Declaration
public List<CustomProperty> CustomProperties { get; }
Property Value
DataConsolidate
Declaration
public DataConsolidate DataConsolidate { get; }
Property Value
DataValidations
Declaration
public DataValidationCollection DataValidations { get; }
Property Value
DateTimeOrigin
Declaration
public DateTimeOrigin DateTimeOrigin { get; }
Property Value
DefaultColumnWidthCharacter
Gets or sets the default column width in characters for the worksheet.
Declaration
public double DefaultColumnWidthCharacter { get; set; }
Property Value
Type |
Description |
System.Double |
|
DefaultColumnWidthPixel
Gets or sets the default column width for a worksheet in pixels.
Declaration
public double DefaultColumnWidthPixel { get; set; }
Property Value
Type |
Description |
System.Double |
|
DefaultRowHeightPixels
Declaration
public double DefaultRowHeightPixels { get; set; }
Property Value
Type |
Description |
System.Double |
|
DefaultRowHeightPoints
Gets or sets the default of height of the rows in points.
Declaration
public double DefaultRowHeightPoints { get; set; }
Property Value
Type |
Description |
System.Double |
|
Declaration
public WorksheetFormControlCollection FormControls { get; }
Property Value
Hyperlinks
Get the hyperlinks on a worksheet.
Declaration
public HyperlinkCollection Hyperlinks { get; }
Property Value
Item[CellAddress]
Declaration
public Cell this[CellAddress address] { get; }
Parameters
Property Value
Item[Int32, Int32]
Get the cell at a given row and column index
Declaration
public Cell this[int row, int column] { get; }
Parameters
Type |
Name |
Description |
System.Int32 |
row |
The index of the row, zero based
|
System.Int32 |
column |
The index of the column, zero based
|
Property Value
Type |
Description |
Cell |
The cell
|
Item[String]
Get the cell for a given label (e.g. "A1")
Declaration
public Cell this[string label] { get; }
Parameters
Type |
Name |
Description |
System.String |
label |
The cell label
|
Property Value
Type |
Description |
Cell |
The cell
|
OleObjects
Declaration
public OleObjectCollection OleObjects { get; }
Property Value
PageSetup
Declaration
public WorksheetPageSetup PageSetup { get; }
Property Value
PivotTables
Declaration
public PivotTableCollection PivotTables { get; }
Property Value
QueryTables
Get the query tables of the worksheet
Declaration
public QueryTableCollection QueryTables { get; }
Property Value
Range
Declaration
public RangeAccessor Range { get; }
Property Value
RowBreaks
Declaration
public PageBreakCollection RowBreaks { get; }
Property Value
Rows
Gets the collection of rows of the worksheet
Declaration
public RowCollection Rows { get; }
Property Value
Scenarios
Get or set the scenarios of the worksheet
Declaration
public ScenarioCollection Scenarios { get; }
Property Value
Selection
Get or set the selection range of the worksheet. The selection range must contain the active cell.
Declaration
public Range Selection { get; set; }
Property Value
Shapes
Declaration
public WorksheetShapeCollection Shapes { get; }
Property Value
Slicers
Declaration
public SlicerCollection Slicers { get; }
Property Value
SortedRanges
Declaration
public List<SortState> SortedRanges { get; }
Property Value
SparkLineGroups
Get the list of spark line groups
Declaration
public SparklineGroupCollection SparkLineGroups { get; }
Property Value
Tables
Get the tables of the worksheet
Declaration
public TableCollection Tables { get; }
Property Value
Timelines
Declaration
public TimelineCollection Timelines { get; }
Property Value
UsedRange
Declaration
public Range UsedRange { get; }
Property Value
View
Declaration
public WorksheetView View { get; }
Property Value
Methods
Calculate()
Calculate the entire worksheet
Declaration
Clear()
Remove all content, cell formatting and tables from the worksheet
Declaration
Filter(String)
Declaration
public AutoFilter Filter(string rangeReference)
Parameters
Type |
Name |
Description |
System.String |
rangeReference |
|
Returns
FindAll(FindArguments)
Declaration
public IEnumerable<Cell> FindAll(FindArguments arguments)
Parameters
Returns
Type |
Description |
IEnumerable<Cell> |
|
GetRange(Cell, Cell)
Get a rectangular range of cell between two cells
Declaration
public Range GetRange(Cell cell1, Cell cell2)
Parameters
Type |
Name |
Description |
Cell |
cell1 |
The top left cell of the range
|
Cell |
cell2 |
The bottom right cell of the range
|
Returns
Type |
Description |
Range |
The range
|
GetRange(String)
Declaration
public Range GetRange(string label)
Parameters
Type |
Name |
Description |
System.String |
label |
|
Returns
Merge(Range)
Declaration
public void Merge(Range range)
Parameters
Type |
Name |
Description |
Range |
range |
|
Merge(String)
Declaration
public void Merge(string label)
Parameters
Type |
Name |
Description |
System.String |
label |
|
ReplaceAll(ReplaceArguments)
Declaration
public void ReplaceAll(ReplaceArguments arguments)
Parameters
Unmerge(String)
Declaration
public void Unmerge(string label)
Parameters
Type |
Name |
Description |
System.String |
label |
|
Events
LayoutChanged
Occurs when the layout of the worksheet change, e.g. when a column is resized
Declaration
public event EventHandler LayoutChanged
Event Type
Type |
Description |
EventHandler |
|