Class ExcelAddressBase
A range address
Inherited Members
Namespace: OfficeOpenXml
Assembly: EPPlus.dll
Syntax
public class ExcelAddressBase : ExcelCellBase
Remarks
Examples of addresses are "A1" "B1:C2" "A:A" "1:1" "A1:E2,G3:G5"
Constructors
ExcelAddressBase(Int32, Int32, Int32, Int32)
Creates an Address object
Declaration
public ExcelAddressBase(int fromRow, int fromCol, int toRow, int toColumn)
Parameters
Type | Name | Description |
---|---|---|
System.Int32 | fromRow | start row |
System.Int32 | fromCol | start column |
System.Int32 | toRow | End row |
System.Int32 | toColumn | End column |
ExcelAddressBase(Int32, Int32, Int32, Int32, Boolean, Boolean, Boolean, Boolean)
Creates an Address object
Declaration
public ExcelAddressBase(int fromRow, int fromCol, int toRow, int toColumn, bool fromRowFixed, bool fromColFixed, bool toRowFixed, bool toColFixed)
Parameters
Type | Name | Description |
---|---|---|
System.Int32 | fromRow | Start row |
System.Int32 | fromCol | Start column |
System.Int32 | toRow | End row |
System.Int32 | toColumn | End column |
System.Boolean | fromRowFixed | Start row fixed |
System.Boolean | fromColFixed | Start column fixed |
System.Boolean | toRowFixed | End row fixed |
System.Boolean | toColFixed | End column fixed |
ExcelAddressBase(String)
Creates an Address object
Declaration
public ExcelAddressBase(string address)
Parameters
Type | Name | Description |
---|---|---|
System.String | address | The Excel Address |
Remarks
Examples of addresses are "A1" "B1:C2" "A:A" "1:1" "A1:E2,G3:G5"
ExcelAddressBase(String, ExcelPackage, ExcelAddressBase)
Creates an Address object
Declaration
public ExcelAddressBase(string address, ExcelPackage pck, ExcelAddressBase referenceAddress)
Parameters
Type | Name | Description |
---|---|---|
System.String | address | The Excel Address |
ExcelPackage | pck | Reference to the package to find information about tables and names |
ExcelAddressBase | referenceAddress | The address |
Remarks
Examples of addresses are "A1" "B1:C2" "A:A" "1:1" "A1:E2,G3:G5"
ExcelAddressBase(String, Int32, Int32, Int32, Int32)
Creates an Address object
Declaration
public ExcelAddressBase(string worksheetName, int fromRow, int fromCol, int toRow, int toColumn)
Parameters
Type | Name | Description |
---|---|---|
System.String | worksheetName | Worksheet name |
System.Int32 | fromRow | Start row |
System.Int32 | fromCol | Start column |
System.Int32 | toRow | End row |
System.Int32 | toColumn | End column |
Properties
Address
The address for the range
Declaration
public virtual string Address { get; }
Property Value
Type | Description |
---|---|
System.String |
Columns
Number of columns int the address
Declaration
public int Columns { get; }
Property Value
Type | Description |
---|---|
System.Int32 |
End
Gets the row and column of the bottom right cell.
Declaration
public ExcelCellAddress End { get; }
Property Value
Type | Description |
---|---|
ExcelCellAddress | The end row column. |
IsFullColumn
Returns true if the range spans a full column
Declaration
public bool IsFullColumn { get; }
Property Value
Type | Description |
---|---|
System.Boolean |
IsFullRow
Returns true if the range spans a full row
Declaration
public bool IsFullRow { get; }
Property Value
Type | Description |
---|---|
System.Boolean |
IsName
If the address is a defined name
Declaration
public bool IsName { get; }
Property Value
Type | Description |
---|---|
System.Boolean |
Rows
Number of rows int the address
Declaration
public int Rows { get; }
Property Value
Type | Description |
---|---|
System.Int32 |
Start
Gets the row and column of the top left cell.
Declaration
public ExcelCellAddress Start { get; }
Property Value
Type | Description |
---|---|
ExcelCellAddress | The start row column. |
Table
If the address is refering a table, this property contains additional information
Declaration
public ExcelTableAddress Table { get; }
Property Value
Type | Description |
---|---|
ExcelTableAddress |
Methods
ChangeAddress()
Called when the address changes
Declaration
protected virtual void ChangeAddress()
SetAddress(String)
Sets the address
Declaration
protected void SetAddress(string address)
Parameters
Type | Name | Description |
---|---|---|
System.String | address | the address |
ToString()
Returns the address text
Declaration
public override string ToString()
Returns
Type | Description |
---|---|
System.String |
Overrides
Validate()
Validate the address
Declaration
protected void Validate()