Class SingleCellRange
Represents a range that consists of a single cell.
Inherited Members
Namespace: DRIT.Spreadsheet
Assembly: DRIT.Spreadsheet.dll
Syntax
public class SingleCellRange : CellsRange, INotifyPropertyChanged, IEnumerable<object>, IEnumerable
Remarks
SingleCellRange is a specialized CellsRange for single-cell ranges.
It provides optimized operations for working with individual cells.
This class is commonly used when a range operation needs to target a specific cell, such as when setting a formula or formatting a single cell.
Examples
// Create a single cell range
var singleCell = new SingleCellRange(worksheet.Cells["A1"]);
singleCell.Value = "Hello, World!";
Properties
BottomLeft
Exposes the bottom left associated with SingleCellRange.
Declaration
public override Cell BottomLeft { get; }
Property Value
| Type | Description |
|---|---|
| Cell | The bottom left returned by the operation. |
Overrides
Remarks
SingleCellRange is a specialized CellsRange for single-cell ranges.
It provides optimized operations for working with individual cells.
This class is commonly used when a range operation needs to target a specific cell, such as when setting a formula or formatting a single cell.
BottomRight
Exposes the bottom right associated with SingleCellRange.
Declaration
public override Cell BottomRight { get; }
Property Value
| Type | Description |
|---|---|
| Cell | The bottom right returned by the operation. |
Overrides
Remarks
SingleCellRange is a specialized CellsRange for single-cell ranges.
It provides optimized operations for working with individual cells.
This class is commonly used when a range operation needs to target a specific cell, such as when setting a formula or formatting a single cell.
ColumnCount
Reports the number of items currently held by SingleCellRange.
Declaration
public override int ColumnCount { get; }
Property Value
| Type | Description |
|---|---|
| int | The column count returned by the operation. |
Overrides
Remarks
SingleCellRange is a specialized CellsRange for single-cell ranges.
It provides optimized operations for working with individual cells.
This class is commonly used when a range operation needs to target a specific cell, such as when setting a formula or formatting a single cell.
FirstColumnIndex
Exposes the first column index associated with SingleCellRange.
Declaration
public override int FirstColumnIndex { get; }
Property Value
| Type | Description |
|---|---|
| int | The first column index returned by the operation. |
Overrides
Remarks
SingleCellRange is a specialized CellsRange for single-cell ranges.
It provides optimized operations for working with individual cells.
This class is commonly used when a range operation needs to target a specific cell, such as when setting a formula or formatting a single cell.
FirstRowIndex
Exposes the first row index associated with SingleCellRange.
Declaration
public override int FirstRowIndex { get; }
Property Value
| Type | Description |
|---|---|
| int | The first row index returned by the operation. |
Overrides
Remarks
SingleCellRange is a specialized CellsRange for single-cell ranges.
It provides optimized operations for working with individual cells.
This class is commonly used when a range operation needs to target a specific cell, such as when setting a formula or formatting a single cell.
this[int, int]
Provides indexed access to values in the SingleCellRange.
Declaration
public override Cell this[int row, int column] { get; }
Parameters
| Type | Name | Description |
|---|---|---|
| int | row | |
| int | column |
Property Value
| Type | Description |
|---|---|
| Cell | The this returned by the operation. |
Overrides
Remarks
SingleCellRange is a specialized CellsRange for single-cell ranges.
It provides optimized operations for working with individual cells.
This class is commonly used when a range operation needs to target a specific cell, such as when setting a formula or formatting a single cell.
Label
Exposes the label associated with SingleCellRange.
Declaration
public override string Label { get; }
Property Value
| Type | Description |
|---|---|
| string | The label returned by the operation. |
Overrides
Remarks
SingleCellRange is a specialized CellsRange for single-cell ranges.
It provides optimized operations for working with individual cells.
This class is commonly used when a range operation needs to target a specific cell, such as when setting a formula or formatting a single cell.
RowCount
Reports the number of items currently held by SingleCellRange.
Declaration
public override int RowCount { get; }
Property Value
| Type | Description |
|---|---|
| int | The row count returned by the operation. |
Overrides
Remarks
SingleCellRange is a specialized CellsRange for single-cell ranges.
It provides optimized operations for working with individual cells.
This class is commonly used when a range operation needs to target a specific cell, such as when setting a formula or formatting a single cell.
TopLeftCell
Converts the supplied data for use with the SingleCellRange.
Declaration
public override Cell TopLeftCell { get; }
Property Value
| Type | Description |
|---|---|
| Cell | The top left cell returned by the operation. |
Overrides
Remarks
SingleCellRange is a specialized CellsRange for single-cell ranges.
It provides optimized operations for working with individual cells.
This class is commonly used when a range operation needs to target a specific cell, such as when setting a formula or formatting a single cell.
TopRight
Converts the supplied data for use with the SingleCellRange.
Declaration
public override Cell TopRight { get; }
Property Value
| Type | Description |
|---|---|
| Cell | The top right returned by the operation. |
Overrides
Remarks
SingleCellRange is a specialized CellsRange for single-cell ranges.
It provides optimized operations for working with individual cells.
This class is commonly used when a range operation needs to target a specific cell, such as when setting a formula or formatting a single cell.
Worksheet
Exposes the worksheet associated with SingleCellRange.
Declaration
public override Worksheet Worksheet { get; }
Property Value
| Type | Description |
|---|---|
| Worksheet | The worksheet returned by the operation. |
Overrides
Remarks
SingleCellRange is a specialized CellsRange for single-cell ranges.
It provides optimized operations for working with individual cells.
This class is commonly used when a range operation needs to target a specific cell, such as when setting a formula or formatting a single cell.
Methods
GetAllCells()
Retrieves the requested all cells from the SingleCellRange.
Declaration
public override IEnumerable<Cell> GetAllCells()
Returns
| Type | Description |
|---|---|
| IEnumerable<Cell> | The get all cells returned by the operation. |
Overrides
Remarks
SingleCellRange is a specialized CellsRange for single-cell ranges.
It provides optimized operations for working with individual cells.
This class is commonly used when a range operation needs to target a specific cell, such as when setting a formula or formatting a single cell.
GetColumns()
Retrieves the requested columns from the SingleCellRange.
Declaration
public override IEnumerable<Column> GetColumns()
Returns
| Type | Description |
|---|---|
| IEnumerable<Column> | The get columns returned by the operation. |
Overrides
Remarks
SingleCellRange is a specialized CellsRange for single-cell ranges.
It provides optimized operations for working with individual cells.
This class is commonly used when a range operation needs to target a specific cell, such as when setting a formula or formatting a single cell.
GetRows()
Retrieves the requested rows from the SingleCellRange.
Declaration
public override IEnumerable<Row> GetRows()
Returns
| Type | Description |
|---|---|
| IEnumerable<Row> | The get rows returned by the operation. |
Overrides
Remarks
SingleCellRange is a specialized CellsRange for single-cell ranges.
It provides optimized operations for working with individual cells.
This class is commonly used when a range operation needs to target a specific cell, such as when setting a formula or formatting a single cell.
SetBorder(Border, BorderType)
Updates the border held by the SingleCellRange.
Declaration
public override void SetBorder(Border border, BorderType borderType)
Parameters
| Type | Name | Description |
|---|---|---|
| Border | border | The border used by the operation. |
| BorderType | borderType | The border type used by the operation. |
Overrides
Remarks
SingleCellRange is a specialized CellsRange for single-cell ranges.
It provides optimized operations for working with individual cells.
This class is commonly used when a range operation needs to target a specific cell, such as when setting a formula or formatting a single cell.
SetStyle(CellStyle)
Updates the style held by the SingleCellRange.
Declaration
public override void SetStyle(CellStyle cellStyle)
Parameters
| Type | Name | Description |
|---|---|---|
| CellStyle | cellStyle | The cell style used by the operation. |
Overrides
Remarks
SingleCellRange is a specialized CellsRange for single-cell ranges.
It provides optimized operations for working with individual cells.
This class is commonly used when a range operation needs to target a specific cell, such as when setting a formula or formatting a single cell.