• DR-IT Software
  • Products
  • Documentation
  • Product page
  • Examples
  • API reference
  • Support
Show / Hide Table of Contents

Class Worksheet

Represents a worksheet in a spreadsheet workbook.

Inheritance
object
Sheet
Worksheet
Macrosheet
Inherited Members
Sheet.Visibility
Sheet.Name
Sheet.Workbook
Sheet.Properties
Sheet.Protection
Sheet.AllowEditRanges
object.ToString()
object.Equals(object)
object.Equals(object, object)
object.ReferenceEquals(object, object)
object.GetHashCode()
object.GetType()
object.MemberwiseClone()
Namespace: DRIT.Spreadsheet
Assembly: DRIT.Spreadsheet.dll
Syntax
public class Worksheet : Sheet
Remarks

A Worksheet is the primary sheet type for storing tabular data. It contains cells organized in rows and columns, and provides access to ranges, tables, charts, pivot tables, and other worksheet-level features.

Worksheets support up to 1,048,576 rows and 16,384 columns.

Examples
// Access a worksheet and work with cells
var worksheet = workbook.Worksheets["Sheet1"];
var range = worksheet.Cells["A1:B10"];
range.SetValue(new object[,] { { 1, 2 }, { 3, 4 } });

Properties

ActiveCell

Get or set the active cell of the worksheet which receives keyboard message.

Declaration
public Cell ActiveCell { get; set; }
Property Value
Type Description
Cell
Remarks

A Worksheet is the primary sheet type for storing tabular data. It contains cells organized in rows and columns, and provides access to ranges, tables, charts, pivot tables, and other worksheet-level features.

Worksheets support up to 1,048,576 rows and 16,384 columns.

ActiveXControls

Exposes the active xcontrols associated with Worksheet.

Declaration
public WorksheetActiveXControlCollection ActiveXControls { get; }
Property Value
Type Description
WorksheetActiveXControlCollection

The active xcontrols returned by the operation.

Remarks

A Worksheet is the primary sheet type for storing tabular data. It contains cells organized in rows and columns, and provides access to ranges, tables, charts, pivot tables, and other worksheet-level features.

Worksheets support up to 1,048,576 rows and 16,384 columns.

AutoFilter

Get or set the auto filter of the worksheet

Declaration
public AutoFilter AutoFilter { get; }
Property Value
Type Description
AutoFilter
Remarks

A Worksheet is the primary sheet type for storing tabular data. It contains cells organized in rows and columns, and provides access to ranges, tables, charts, pivot tables, and other worksheet-level features.

Worksheets support up to 1,048,576 rows and 16,384 columns.

CalculationProperties

Gets the calculation properties for the worksheet.

Declaration
public WorksheetCalculationProperties CalculationProperties { get; }
Property Value
Type Description
WorksheetCalculationProperties
Remarks

A Worksheet is the primary sheet type for storing tabular data. It contains cells organized in rows and columns, and provides access to ranges, tables, charts, pivot tables, and other worksheet-level features.

Worksheets support up to 1,048,576 rows and 16,384 columns.

CellWatches

Specifies the list of cell watches for the worksheet.

Declaration
public List<CellWatch> CellWatches { get; set; }
Property Value
Type Description
List<CellWatch>
Remarks

A Worksheet is the primary sheet type for storing tabular data. It contains cells organized in rows and columns, and provides access to ranges, tables, charts, pivot tables, and other worksheet-level features.

Worksheets support up to 1,048,576 rows and 16,384 columns.

Charts

Exposes the charts associated with Worksheet.

Declaration
public WorksheetChartsCollection Charts { get; }
Property Value
Type Description
WorksheetChartsCollection

The charts returned by the operation.

Remarks

A Worksheet is the primary sheet type for storing tabular data. It contains cells organized in rows and columns, and provides access to ranges, tables, charts, pivot tables, and other worksheet-level features.

Worksheets support up to 1,048,576 rows and 16,384 columns.

ColumnBreaks

Get the column breaks

Declaration
public PageBreakCollection ColumnBreaks { get; }
Property Value
Type Description
PageBreakCollection
Remarks

A Worksheet is the primary sheet type for storing tabular data. It contains cells organized in rows and columns, and provides access to ranges, tables, charts, pivot tables, and other worksheet-level features.

Worksheets support up to 1,048,576 rows and 16,384 columns.

Columns

Get the collection of columns of the worksheet

Declaration
public ColumnCollection Columns { get; }
Property Value
Type Description
ColumnCollection
Remarks

A Worksheet is the primary sheet type for storing tabular data. It contains cells organized in rows and columns, and provides access to ranges, tables, charts, pivot tables, and other worksheet-level features.

Worksheets support up to 1,048,576 rows and 16,384 columns.

Comments

Exposes the comments associated with Worksheet.

Declaration
public CommentCollection Comments { get; }
Property Value
Type Description
CommentCollection

The comments returned by the operation.

Remarks

A Worksheet is the primary sheet type for storing tabular data. It contains cells organized in rows and columns, and provides access to ranges, tables, charts, pivot tables, and other worksheet-level features.

Worksheets support up to 1,048,576 rows and 16,384 columns.

ConditionalFormattings

Exposes the conditional formattings associated with Worksheet.

Declaration
public ConditionalFormattingCollection ConditionalFormattings { get; }
Property Value
Type Description
ConditionalFormattingCollection

The conditional formattings returned by the operation.

Remarks

A Worksheet is the primary sheet type for storing tabular data. It contains cells organized in rows and columns, and provides access to ranges, tables, charts, pivot tables, and other worksheet-level features.

Worksheets support up to 1,048,576 rows and 16,384 columns.

CustomProperties

Exposes the custom properties associated with Worksheet.

Declaration
public List<CustomProperty> CustomProperties { get; }
Property Value
Type Description
List<CustomProperty>

The custom properties returned by the operation.

Remarks

A Worksheet is the primary sheet type for storing tabular data. It contains cells organized in rows and columns, and provides access to ranges, tables, charts, pivot tables, and other worksheet-level features.

Worksheets support up to 1,048,576 rows and 16,384 columns.

DataConsolidate

Specifies the data consolidation settings for the worksheet.

Declaration
public DataConsolidate DataConsolidate { get; }
Property Value
Type Description
DataConsolidate
Remarks

A Worksheet is the primary sheet type for storing tabular data. It contains cells organized in rows and columns, and provides access to ranges, tables, charts, pivot tables, and other worksheet-level features.

Worksheets support up to 1,048,576 rows and 16,384 columns.

DataValidations

Exposes the data validations associated with Worksheet.

Declaration
public DataValidationCollection DataValidations { get; }
Property Value
Type Description
DataValidationCollection

The data validations returned by the operation.

Remarks

A Worksheet is the primary sheet type for storing tabular data. It contains cells organized in rows and columns, and provides access to ranges, tables, charts, pivot tables, and other worksheet-level features.

Worksheets support up to 1,048,576 rows and 16,384 columns.

DateTimeOrigin

Gets the date system used to encode date and time values in the workbook.

Declaration
public DateTimeOrigin DateTimeOrigin { get; }
Property Value
Type Description
DateTimeOrigin
Remarks

A Worksheet is the primary sheet type for storing tabular data. It contains cells organized in rows and columns, and provides access to ranges, tables, charts, pivot tables, and other worksheet-level features.

Worksheets support up to 1,048,576 rows and 16,384 columns.

DefaultColumnWidthCharacter

Specifies the default column width in characters for the worksheet.

Declaration
public double DefaultColumnWidthCharacter { get; set; }
Property Value
Type Description
double
Remarks

A Worksheet is the primary sheet type for storing tabular data. It contains cells organized in rows and columns, and provides access to ranges, tables, charts, pivot tables, and other worksheet-level features.

Worksheets support up to 1,048,576 rows and 16,384 columns.

DefaultColumnWidthPixel

Specifies the default column width for a worksheet in pixels.

Declaration
public double DefaultColumnWidthPixel { get; set; }
Property Value
Type Description
double
Remarks

A Worksheet is the primary sheet type for storing tabular data. It contains cells organized in rows and columns, and provides access to ranges, tables, charts, pivot tables, and other worksheet-level features.

Worksheets support up to 1,048,576 rows and 16,384 columns.

DefaultRowHeightPixels

Specifies the default row height for the worksheet in pixels.

Declaration
public double DefaultRowHeightPixels { get; set; }
Property Value
Type Description
double
Remarks

A Worksheet is the primary sheet type for storing tabular data. It contains cells organized in rows and columns, and provides access to ranges, tables, charts, pivot tables, and other worksheet-level features.

Worksheets support up to 1,048,576 rows and 16,384 columns.

DefaultRowHeightPoints

Specifies the default of height of the rows in points.

Declaration
public double DefaultRowHeightPoints { get; set; }
Property Value
Type Description
double
Remarks

A Worksheet is the primary sheet type for storing tabular data. It contains cells organized in rows and columns, and provides access to ranges, tables, charts, pivot tables, and other worksheet-level features.

Worksheets support up to 1,048,576 rows and 16,384 columns.

FormControls

Gets the collection of form controls on the worksheet.

Declaration
public WorksheetFormControlCollection FormControls { get; }
Property Value
Type Description
WorksheetFormControlCollection
Remarks

A Worksheet is the primary sheet type for storing tabular data. It contains cells organized in rows and columns, and provides access to ranges, tables, charts, pivot tables, and other worksheet-level features.

Worksheets support up to 1,048,576 rows and 16,384 columns.

Hyperlinks

Get the hyperlinks on a worksheet.

Declaration
public HyperlinkCollection Hyperlinks { get; }
Property Value
Type Description
HyperlinkCollection
Remarks

A Worksheet is the primary sheet type for storing tabular data. It contains cells organized in rows and columns, and provides access to ranges, tables, charts, pivot tables, and other worksheet-level features.

Worksheets support up to 1,048,576 rows and 16,384 columns.

this[CellAddress]

Gets the cell at a given address. Cell addresses are zero based (A1 maps to (0, 0)).

Declaration
public Cell this[CellAddress address] { get; }
Parameters
Type Name Description
CellAddress address

The cell address.

Property Value
Type Description
Cell

The cell.

Remarks

A Worksheet is the primary sheet type for storing tabular data. It contains cells organized in rows and columns, and provides access to ranges, tables, charts, pivot tables, and other worksheet-level features.

Worksheets support up to 1,048,576 rows and 16,384 columns.

this[int, int]

Get the cell at a given row and column index

Declaration
public Cell this[int row, int column] { get; }
Parameters
Type Name Description
int row

The index of the row, zero based

int column

The index of the column, zero based

Property Value
Type Description
Cell

The cell

Remarks

A Worksheet is the primary sheet type for storing tabular data. It contains cells organized in rows and columns, and provides access to ranges, tables, charts, pivot tables, and other worksheet-level features.

Worksheets support up to 1,048,576 rows and 16,384 columns.

this[string]

Get the cell for a given label (e.g. "A1")

Declaration
public Cell this[string label] { get; }
Parameters
Type Name Description
string label

The cell label

Property Value
Type Description
Cell

The cell

Remarks

A Worksheet is the primary sheet type for storing tabular data. It contains cells organized in rows and columns, and provides access to ranges, tables, charts, pivot tables, and other worksheet-level features.

Worksheets support up to 1,048,576 rows and 16,384 columns.

MergedCellRanges

Gets a read-only list of the A1-style labels of all merged cell ranges in this worksheet.

Declaration
public IReadOnlyList<string> MergedCellRanges { get; }
Property Value
Type Description
IReadOnlyList<string>
Remarks

A Worksheet is the primary sheet type for storing tabular data. It contains cells organized in rows and columns, and provides access to ranges, tables, charts, pivot tables, and other worksheet-level features.

Worksheets support up to 1,048,576 rows and 16,384 columns.

OleObjects

Gets the collection of OLE objects embedded in the worksheet.

Declaration
public OleObjectCollection OleObjects { get; }
Property Value
Type Description
OleObjectCollection
Remarks

A Worksheet is the primary sheet type for storing tabular data. It contains cells organized in rows and columns, and provides access to ranges, tables, charts, pivot tables, and other worksheet-level features.

Worksheets support up to 1,048,576 rows and 16,384 columns.

PageSetup

Gets the page setup settings for printing the worksheet.

Declaration
public WorksheetPageSetup PageSetup { get; }
Property Value
Type Description
WorksheetPageSetup
Remarks

A Worksheet is the primary sheet type for storing tabular data. It contains cells organized in rows and columns, and provides access to ranges, tables, charts, pivot tables, and other worksheet-level features.

Worksheets support up to 1,048,576 rows and 16,384 columns.

Pictures

Gets a typed collection of pictures on this worksheet.

Declaration
public PictureCollection Pictures { get; }
Property Value
Type Description
PictureCollection
Remarks

A Worksheet is the primary sheet type for storing tabular data. It contains cells organized in rows and columns, and provides access to ranges, tables, charts, pivot tables, and other worksheet-level features.

Worksheets support up to 1,048,576 rows and 16,384 columns.

PivotTables

Gets the collection of pivot tables in the worksheet.

Declaration
public PivotTableCollection PivotTables { get; }
Property Value
Type Description
PivotTableCollection
Remarks

A Worksheet is the primary sheet type for storing tabular data. It contains cells organized in rows and columns, and provides access to ranges, tables, charts, pivot tables, and other worksheet-level features.

Worksheets support up to 1,048,576 rows and 16,384 columns.

QueryTables

Gets the query tables of the worksheet.

Declaration
public QueryTableCollection QueryTables { get; }
Property Value
Type Description
QueryTableCollection
Remarks

A Worksheet is the primary sheet type for storing tabular data. It contains cells organized in rows and columns, and provides access to ranges, tables, charts, pivot tables, and other worksheet-level features.

Worksheets support up to 1,048,576 rows and 16,384 columns.

Range

Gets the range accessor for the worksheet, providing access to range operations.

Declaration
public RangeAccessor Range { get; }
Property Value
Type Description
RangeAccessor
Remarks

A Worksheet is the primary sheet type for storing tabular data. It contains cells organized in rows and columns, and provides access to ranges, tables, charts, pivot tables, and other worksheet-level features.

Worksheets support up to 1,048,576 rows and 16,384 columns.

RowBreaks

Get the row breaks

Declaration
public PageBreakCollection RowBreaks { get; }
Property Value
Type Description
PageBreakCollection
Remarks

A Worksheet is the primary sheet type for storing tabular data. It contains cells organized in rows and columns, and provides access to ranges, tables, charts, pivot tables, and other worksheet-level features.

Worksheets support up to 1,048,576 rows and 16,384 columns.

Rows

Gets the collection of rows of the worksheet

Declaration
public RowCollection Rows { get; }
Property Value
Type Description
RowCollection
Remarks

A Worksheet is the primary sheet type for storing tabular data. It contains cells organized in rows and columns, and provides access to ranges, tables, charts, pivot tables, and other worksheet-level features.

Worksheets support up to 1,048,576 rows and 16,384 columns.

Scenarios

Get or set the scenarios of the worksheet

Declaration
public ScenarioCollection Scenarios { get; }
Property Value
Type Description
ScenarioCollection
Remarks

A Worksheet is the primary sheet type for storing tabular data. It contains cells organized in rows and columns, and provides access to ranges, tables, charts, pivot tables, and other worksheet-level features.

Worksheets support up to 1,048,576 rows and 16,384 columns.

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
Type Description
Range
Remarks

A Worksheet is the primary sheet type for storing tabular data. It contains cells organized in rows and columns, and provides access to ranges, tables, charts, pivot tables, and other worksheet-level features.

Worksheets support up to 1,048,576 rows and 16,384 columns.

Exceptions
Type Condition
ArgumentException

Shapes

Gets the collection of shapes (drawing objects) on the worksheet.

Declaration
public WorksheetShapeCollection Shapes { get; }
Property Value
Type Description
WorksheetShapeCollection
Remarks

A Worksheet is the primary sheet type for storing tabular data. It contains cells organized in rows and columns, and provides access to ranges, tables, charts, pivot tables, and other worksheet-level features.

Worksheets support up to 1,048,576 rows and 16,384 columns.

Slicers

Exposes the slicers associated with Worksheet.

Declaration
public SlicerCollection Slicers { get; }
Property Value
Type Description
SlicerCollection

The slicers returned by the operation.

Remarks

A Worksheet is the primary sheet type for storing tabular data. It contains cells organized in rows and columns, and provides access to ranges, tables, charts, pivot tables, and other worksheet-level features.

Worksheets support up to 1,048,576 rows and 16,384 columns.

SortedRanges

Exposes the sorted ranges associated with Worksheet.

Declaration
public List<SortState> SortedRanges { get; }
Property Value
Type Description
List<SortState>

The sorted ranges returned by the operation.

Remarks

A Worksheet is the primary sheet type for storing tabular data. It contains cells organized in rows and columns, and provides access to ranges, tables, charts, pivot tables, and other worksheet-level features.

Worksheets support up to 1,048,576 rows and 16,384 columns.

SparkLineGroups

Get the list of spark line groups

Declaration
public SparklineGroupCollection SparkLineGroups { get; }
Property Value
Type Description
SparklineGroupCollection
Remarks

A Worksheet is the primary sheet type for storing tabular data. It contains cells organized in rows and columns, and provides access to ranges, tables, charts, pivot tables, and other worksheet-level features.

Worksheets support up to 1,048,576 rows and 16,384 columns.

Tables

Get the tables of the worksheet

Declaration
public TableCollection Tables { get; }
Property Value
Type Description
TableCollection
Remarks

A Worksheet is the primary sheet type for storing tabular data. It contains cells organized in rows and columns, and provides access to ranges, tables, charts, pivot tables, and other worksheet-level features.

Worksheets support up to 1,048,576 rows and 16,384 columns.

ThreadedComments

Gets the collection of threaded (modern) comments on the worksheet.

Declaration
public ThreadedCommentCollection ThreadedComments { get; }
Property Value
Type Description
ThreadedCommentCollection
Remarks

A Worksheet is the primary sheet type for storing tabular data. It contains cells organized in rows and columns, and provides access to ranges, tables, charts, pivot tables, and other worksheet-level features.

Worksheets support up to 1,048,576 rows and 16,384 columns.

Timelines

Exposes the timelines associated with Worksheet.

Declaration
public TimelineCollection Timelines { get; }
Property Value
Type Description
TimelineCollection

The timelines returned by the operation.

Remarks

A Worksheet is the primary sheet type for storing tabular data. It contains cells organized in rows and columns, and provides access to ranges, tables, charts, pivot tables, and other worksheet-level features.

Worksheets support up to 1,048,576 rows and 16,384 columns.

UsedRange

Get the used range.

Declaration
public Range UsedRange { get; }
Property Value
Type Description
Range
Remarks

A Worksheet is the primary sheet type for storing tabular data. It contains cells organized in rows and columns, and provides access to ranges, tables, charts, pivot tables, and other worksheet-level features.

Worksheets support up to 1,048,576 rows and 16,384 columns.

View

Exposes the worksheet view associated with Worksheet.

Declaration
public WorksheetView View { get; }
Property Value
Type Description
WorksheetView

The worksheet view returned by the operation.

Remarks

A Worksheet is the primary sheet type for storing tabular data. It contains cells organized in rows and columns, and provides access to ranges, tables, charts, pivot tables, and other worksheet-level features.

Worksheets support up to 1,048,576 rows and 16,384 columns.

Methods

Calculate()

Calculate the entire worksheet

Declaration
public void Calculate()
Remarks

A Worksheet is the primary sheet type for storing tabular data. It contains cells organized in rows and columns, and provides access to ranges, tables, charts, pivot tables, and other worksheet-level features.

Worksheets support up to 1,048,576 rows and 16,384 columns.

Calculate(CancellationToken)

Calculate the entire worksheet, stopping early if cancellationToken is cancelled. Throws OperationCanceledException if cancellation is requested before all cells finish.

Declaration
public void Calculate(CancellationToken cancellationToken)
Parameters
Type Name Description
CancellationToken cancellationToken
Remarks

A Worksheet is the primary sheet type for storing tabular data. It contains cells organized in rows and columns, and provides access to ranges, tables, charts, pivot tables, and other worksheet-level features.

Worksheets support up to 1,048,576 rows and 16,384 columns.

CalculateFormula(string)

Evaluates a formula string in the context of this worksheet and returns the result, without modifying any cell. Relative references are resolved from cell A1.

Declaration
public object CalculateFormula(string formula)
Parameters
Type Name Description
string formula

The formula to evaluate (with or without leading '=').

Returns
Type Description
object

The calculated value.

Remarks

A Worksheet is the primary sheet type for storing tabular data. It contains cells organized in rows and columns, and provides access to ranges, tables, charts, pivot tables, and other worksheet-level features.

Worksheets support up to 1,048,576 rows and 16,384 columns.

CleanText(TextCleansingOptions)

Exposes the clean text associated with Worksheet.

Declaration
public TextCleansingResult CleanText(TextCleansingOptions options)
Parameters
Type Name Description
TextCleansingOptions options

The options used by the operation.

Returns
Type Description
TextCleansingResult

The clean text returned by the operation.

Remarks

A Worksheet is the primary sheet type for storing tabular data. It contains cells organized in rows and columns, and provides access to ranges, tables, charts, pivot tables, and other worksheet-level features.

Worksheets support up to 1,048,576 rows and 16,384 columns.

CleanText(Range, TextCleansingOptions)

Exposes the clean text associated with Worksheet.

Declaration
public TextCleansingResult CleanText(Range range, TextCleansingOptions options)
Parameters
Type Name Description
Range range

The range used by the operation.

TextCleansingOptions options

The options used by the operation.

Returns
Type Description
TextCleansingResult

The clean text returned by the operation.

Remarks

A Worksheet is the primary sheet type for storing tabular data. It contains cells organized in rows and columns, and provides access to ranges, tables, charts, pivot tables, and other worksheet-level features.

Worksheets support up to 1,048,576 rows and 16,384 columns.

Clear()

Remove all content, cell formatting and tables from the worksheet

Declaration
public void Clear()
Remarks

A Worksheet is the primary sheet type for storing tabular data. It contains cells organized in rows and columns, and provides access to ranges, tables, charts, pivot tables, and other worksheet-level features.

Worksheets support up to 1,048,576 rows and 16,384 columns.

CopyTo()

Creates a copy of this worksheet in the same workbook.

Declaration
public Worksheet CopyTo()
Returns
Type Description
Worksheet

The copied worksheet.

Remarks

A Worksheet is the primary sheet type for storing tabular data. It contains cells organized in rows and columns, and provides access to ranges, tables, charts, pivot tables, and other worksheet-level features.

Worksheets support up to 1,048,576 rows and 16,384 columns.

CopyTo(Workbook, string)

Copies this worksheet into targetWorkbook, remapping styles onto the target workbook's style sheet. This workbook is not modified.

Declaration
public Worksheet CopyTo(Workbook targetWorkbook, string name = null)
Parameters
Type Name Description
Workbook targetWorkbook

The workbook to copy the worksheet into.

string name

The name for the copied worksheet. When null, a name based on this sheet's name is generated. When the provided name collides with an existing sheet in the target, a " Copy" suffix is appended.

Returns
Type Description
Worksheet

The copied worksheet in targetWorkbook.

Remarks

A Worksheet is the primary sheet type for storing tabular data. It contains cells organized in rows and columns, and provides access to ranges, tables, charts, pivot tables, and other worksheet-level features.

Worksheets support up to 1,048,576 rows and 16,384 columns.

CopyTo(string)

Creates a copy of this worksheet in the same workbook with the specified name.

Declaration
public Worksheet CopyTo(string name)
Parameters
Type Name Description
string name

The name of the copied worksheet.

Returns
Type Description
Worksheet

The copied worksheet.

Remarks

A Worksheet is the primary sheet type for storing tabular data. It contains cells organized in rows and columns, and provides access to ranges, tables, charts, pivot tables, and other worksheet-level features.

Worksheets support up to 1,048,576 rows and 16,384 columns.

DeleteEmptyColumns(DeleteEmptyColumnsOptions)

Removes the selected empty columns from the Worksheet.

Declaration
public int DeleteEmptyColumns(DeleteEmptyColumnsOptions options = null)
Parameters
Type Name Description
DeleteEmptyColumnsOptions options

The options used by the operation.

Returns
Type Description
int

The delete empty columns returned by the operation.

Remarks

A Worksheet is the primary sheet type for storing tabular data. It contains cells organized in rows and columns, and provides access to ranges, tables, charts, pivot tables, and other worksheet-level features.

Worksheets support up to 1,048,576 rows and 16,384 columns.

DeleteEmptyColumns(Range, DeleteEmptyColumnsOptions)

Removes the selected empty columns from the Worksheet.

Declaration
public int DeleteEmptyColumns(Range range, DeleteEmptyColumnsOptions options = null)
Parameters
Type Name Description
Range range

The range used by the operation.

DeleteEmptyColumnsOptions options

The options used by the operation.

Returns
Type Description
int

The delete empty columns returned by the operation.

Remarks

A Worksheet is the primary sheet type for storing tabular data. It contains cells organized in rows and columns, and provides access to ranges, tables, charts, pivot tables, and other worksheet-level features.

Worksheets support up to 1,048,576 rows and 16,384 columns.

DeleteEmptyRows(DeleteEmptyRowsOptions)

Removes the selected empty rows from the Worksheet.

Declaration
public int DeleteEmptyRows(DeleteEmptyRowsOptions options = null)
Parameters
Type Name Description
DeleteEmptyRowsOptions options

The options used by the operation.

Returns
Type Description
int

The delete empty rows returned by the operation.

Remarks

A Worksheet is the primary sheet type for storing tabular data. It contains cells organized in rows and columns, and provides access to ranges, tables, charts, pivot tables, and other worksheet-level features.

Worksheets support up to 1,048,576 rows and 16,384 columns.

DeleteEmptyRows(Range, DeleteEmptyRowsOptions)

Removes the selected empty rows from the Worksheet.

Declaration
public int DeleteEmptyRows(Range range, DeleteEmptyRowsOptions options = null)
Parameters
Type Name Description
Range range

The range used by the operation.

DeleteEmptyRowsOptions options

The options used by the operation.

Returns
Type Description
int

The delete empty rows returned by the operation.

Remarks

A Worksheet is the primary sheet type for storing tabular data. It contains cells organized in rows and columns, and provides access to ranges, tables, charts, pivot tables, and other worksheet-level features.

Worksheets support up to 1,048,576 rows and 16,384 columns.

Filter(string)

Exposes the filter associated with Worksheet.

Declaration
public AutoFilter Filter(string rangeReference)
Parameters
Type Name Description
string rangeReference

The range reference used by the operation.

Returns
Type Description
AutoFilter

The filter returned by the operation.

Remarks

A Worksheet is the primary sheet type for storing tabular data. It contains cells organized in rows and columns, and provides access to ranges, tables, charts, pivot tables, and other worksheet-level features.

Worksheets support up to 1,048,576 rows and 16,384 columns.

FindAll(FindArguments)

Retrieves the requested d all from the Worksheet.

Declaration
public IEnumerable<Cell> FindAll(FindArguments arguments)
Parameters
Type Name Description
FindArguments arguments

The arguments used by the operation.

Returns
Type Description
IEnumerable<Cell>

The find all returned by the operation.

Remarks

A Worksheet is the primary sheet type for storing tabular data. It contains cells organized in rows and columns, and provides access to ranges, tables, charts, pivot tables, and other worksheet-level features.

Worksheets support up to 1,048,576 rows and 16,384 columns.

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

Remarks

A Worksheet is the primary sheet type for storing tabular data. It contains cells organized in rows and columns, and provides access to ranges, tables, charts, pivot tables, and other worksheet-level features.

Worksheets support up to 1,048,576 rows and 16,384 columns.

GetRange(string)

Retrieves the requested range from the Worksheet.

Declaration
public Range GetRange(string label)
Parameters
Type Name Description
string label

The label used by the operation.

Returns
Type Description
Range

The get range returned by the operation.

Remarks

A Worksheet is the primary sheet type for storing tabular data. It contains cells organized in rows and columns, and provides access to ranges, tables, charts, pivot tables, and other worksheet-level features.

Worksheets support up to 1,048,576 rows and 16,384 columns.

Merge(Range)

Merges all cells in the specified range into one displayed cell.

Declaration
public void Merge(Range range)
Parameters
Type Name Description
Range range

The worksheet range whose cells are merged.

Remarks

A Worksheet is the primary sheet type for storing tabular data. It contains cells organized in rows and columns, and provides access to ranges, tables, charts, pivot tables, and other worksheet-level features.

Worksheets support up to 1,048,576 rows and 16,384 columns.

Exceptions
Type Condition
ArgumentNullException

Thrown when range is null.

ArgumentException

Thrown when the range belongs to another worksheet.

Merge(string)

Processes the supplied spreadsheet data for this object.

Declaration
public void Merge(string label)
Parameters
Type Name Description
string label
Remarks

A Worksheet is the primary sheet type for storing tabular data. It contains cells organized in rows and columns, and provides access to ranges, tables, charts, pivot tables, and other worksheet-level features.

Worksheets support up to 1,048,576 rows and 16,384 columns.

RemoveDuplicates(RemoveDuplicatesOptions)

Removes the selected duplicates from the Worksheet.

Declaration
public RemoveDuplicatesResult RemoveDuplicates(RemoveDuplicatesOptions options = null)
Parameters
Type Name Description
RemoveDuplicatesOptions options

The options used by the operation.

Returns
Type Description
RemoveDuplicatesResult

The remove duplicates returned by the operation.

Remarks

A Worksheet is the primary sheet type for storing tabular data. It contains cells organized in rows and columns, and provides access to ranges, tables, charts, pivot tables, and other worksheet-level features.

Worksheets support up to 1,048,576 rows and 16,384 columns.

RemoveDuplicates(Range, RemoveDuplicatesOptions)

Removes the selected duplicates from the Worksheet.

Declaration
public RemoveDuplicatesResult RemoveDuplicates(Range range, RemoveDuplicatesOptions options = null)
Parameters
Type Name Description
Range range

The range used by the operation.

RemoveDuplicatesOptions options

The options used by the operation.

Returns
Type Description
RemoveDuplicatesResult

The remove duplicates returned by the operation.

Remarks

A Worksheet is the primary sheet type for storing tabular data. It contains cells organized in rows and columns, and provides access to ranges, tables, charts, pivot tables, and other worksheet-level features.

Worksheets support up to 1,048,576 rows and 16,384 columns.

ReplaceAll(ReplaceArguments)

Exposes the replace all associated with Worksheet.

Declaration
public void ReplaceAll(ReplaceArguments arguments)
Parameters
Type Name Description
ReplaceArguments arguments

The arguments used by the operation.

Remarks

A Worksheet is the primary sheet type for storing tabular data. It contains cells organized in rows and columns, and provides access to ranges, tables, charts, pivot tables, and other worksheet-level features.

Worksheets support up to 1,048,576 rows and 16,384 columns.

Unmerge(string)

Splits the merged range identified by the cell or range label into individual cells.

Declaration
public void Unmerge(string label)
Parameters
Type Name Description
string label

The cell or range label identifying the merged area.

Remarks

A Worksheet is the primary sheet type for storing tabular data. It contains cells organized in rows and columns, and provides access to ranges, tables, charts, pivot tables, and other worksheet-level features.

Worksheets support up to 1,048,576 rows and 16,384 columns.

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
Remarks

A Worksheet is the primary sheet type for storing tabular data. It contains cells organized in rows and columns, and provides access to ranges, tables, charts, pivot tables, and other worksheet-level features.

Worksheets support up to 1,048,576 rows and 16,384 columns.

Extension Methods

WorksheetImageExporter.ExportRangeToEmf(Worksheet, string, string, RangeImageSaveOptions?)
WorksheetImageExporter.ExportRangeToImage(Worksheet, string, RangeImageSaveOptions?)
WorksheetImageExporter.ExportRangeToImage(Worksheet, string, string, RangeImageSaveOptions?)
WorksheetImageExporter.ExportToImage(Worksheet, RangeImageSaveOptions?)
WorksheetImageExporter.ExportToImage(Worksheet, string, RangeImageSaveOptions?)
Back to top

DR-IT Software documentation

DR-IT Software · Products · Documentation index · Product page · Downloads · Support · Licensing

Generated by DocFX