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. |
fromRow | start row |
System. |
fromCol | start column |
System. |
toRow | End row |
System. |
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. |
fromRow | Start row |
System. |
fromCol | Start column |
System. |
toRow | End row |
System. |
toColumn | End column |
System. |
fromRowFixed | Start row fixed |
System. |
fromColFixed | Start column fixed |
System. |
toRowFixed | End row fixed |
System. |
toColFixed | End column fixed |
ExcelAddressBase(String, ExcelPackage, ExcelAddressBase)
Creates an Address object
Declaration
public ExcelAddressBase(string address, ExcelPackage pck, ExcelAddressBase referenceAddress)
Parameters
Type | Name | Description |
---|---|---|
System. |
address | The Excel Address |
Excel |
pck | Reference to the package to find information about tables and names |
Excel |
referenceAddress | The address |
Remarks
Examples of addresses are "A1" "B1:C2" "A:A" "1:1" "A1:E2,G3:G5"
ExcelAddressBase(String, ExcelWorkbook, String)
Creates an Address object
Declaration
public ExcelAddressBase(string address, ExcelWorkbook wb = null, string wsName = null)
Parameters
Type | Name | Description |
---|---|---|
System. |
address | The Excel Address |
Excel |
wb | The workbook to verify any defined names from |
System. |
wsName | The name of the worksheet the address referes to |
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. |
worksheetName | Worksheet name |
System. |
fromRow | Start row |
System. |
fromCol | Start column |
System. |
toRow | End row |
System. |
toColumn | End column |
Properties
Address
The address for the range
Declaration
public virtual string Address { get; }
Property Value
Type | Description |
---|---|
System. |
Columns
Number of columns int the address
Declaration
public int Columns { get; }
Property Value
Type | Description |
---|---|
System. |
End
Gets the row and column of the bottom right cell.
Declaration
public ExcelCellAddress End { get; }
Property Value
Type | Description |
---|---|
Excel |
The end row column. |
ExternalReferenceIndex
Declaration
public int ExternalReferenceIndex { get; }
Property Value
Type | Description |
---|---|
System. |
FullAddress
The full address including the worksheet
Declaration
public string FullAddress { get; }
Property Value
Type | Description |
---|---|
System. |
IsExternal
Declaration
public bool IsExternal { get; }
Property Value
Type | Description |
---|---|
System. |
IsFullColumn
Returns true if the range spans a full column
Declaration
public bool IsFullColumn { get; }
Property Value
Type | Description |
---|---|
System. |
IsFullRow
Returns true if the range spans a full row
Declaration
public bool IsFullRow { get; }
Property Value
Type | Description |
---|---|
System. |
IsName
If the address is a defined name
Declaration
public bool IsName { get; }
Property Value
Type | Description |
---|---|
System. |
LocalAddress
The address without the workbook or worksheet reference
Declaration
public string LocalAddress { get; }
Property Value
Type | Description |
---|---|
System. |
Rows
Number of rows int the address
Declaration
public int Rows { get; }
Property Value
Type | Description |
---|---|
System. |
Start
Gets the row and column of the top left cell.
Declaration
public ExcelCellAddress Start { get; }
Property Value
Type | Description |
---|---|
Excel |
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 |
---|---|
Excel |
Methods
ChangeAddress()
Called when the address changes
Declaration
protected virtual void ChangeAddress()
Equals(Object)
Declaration
public override bool Equals(object obj)
Parameters
Type | Name | Description |
---|---|---|
System. |
obj |
Returns
Type | Description |
---|---|
System. |
Overrides
SetAddress(String, ExcelWorkbook, String)
Sets the address
Declaration
protected void SetAddress(string address, ExcelWorkbook wb, string wsName)
Parameters
Type | Name | Description |
---|---|---|
System. |
address | The address |
Excel |
wb | |
System. |
wsName |
ToString()
Returns the address text
Declaration
public override string ToString()
Returns
Type | Description |
---|---|
System. |
Overrides
Validate()
Validate the address
Declaration
protected void Validate()