Class ExcelCellBase
Base class containing cell address manipulating methods.
Inherited Members
Namespace: Experior.Core.Data.OfficeOpenXml
Assembly: Experior.Core.dll
Syntax
public abstract class ExcelCellBase
Methods
GetAddress(Int32, Boolean, Int32, Boolean)
Returns the AlphaNumeric representation that Excel expects for a Cell Address
Declaration
public static string GetAddress(int Row, bool AbsoluteRow, int Column, bool AbsoluteCol)
Parameters
Type | Name | Description |
---|---|---|
System.Int32 | Row | The number of the row |
System.Boolean | AbsoluteRow | Absolute row |
System.Int32 | Column | The number of the column in the worksheet |
System.Boolean | AbsoluteCol | Absolute column |
Returns
Type | Description |
---|---|
System.String | The cell address in the format A1 |
GetAddress(Int32, Int32)
Returns the AlphaNumeric representation that Excel expects for a Cell Address
Declaration
public static string GetAddress(int Row, int Column)
Parameters
Type | Name | Description |
---|---|---|
System.Int32 | Row | The number of the row |
System.Int32 | Column | The number of the column in the worksheet |
Returns
Type | Description |
---|---|
System.String | The cell address in the format A1 |
GetAddress(Int32, Int32, Boolean)
Returns the AlphaNumeric representation that Excel expects for a Cell Address
Declaration
public static string GetAddress(int Row, int Column, bool Absolute)
Parameters
Type | Name | Description |
---|---|---|
System.Int32 | Row | The number of the row |
System.Int32 | Column | The number of the column in the worksheet |
System.Boolean | Absolute | Get an absolute address ($A$1) |
Returns
Type | Description |
---|---|
System.String | The cell address in the format A1 |
GetAddress(Int32, Int32, Int32, Int32)
Returns the AlphaNumeric representation that Excel expects for a Cell Address
Declaration
public static string GetAddress(int FromRow, int FromColumn, int ToRow, int ToColumn)
Parameters
Type | Name | Description |
---|---|---|
System.Int32 | FromRow | From row number |
System.Int32 | FromColumn | From column number |
System.Int32 | ToRow | To row number |
System.Int32 | ToColumn | From column number |
Returns
Type | Description |
---|---|
System.String | The cell address in the format A1 |
GetAddress(Int32, Int32, Int32, Int32, Boolean)
Returns the AlphaNumeric representation that Excel expects for a Cell Address
Declaration
public static string GetAddress(int FromRow, int FromColumn, int ToRow, int ToColumn, bool Absolute)
Parameters
Type | Name | Description |
---|---|---|
System.Int32 | FromRow | From row number |
System.Int32 | FromColumn | From column number |
System.Int32 | ToRow | To row number |
System.Int32 | ToColumn | From column number |
System.Boolean | Absolute | if true address is absolute (like $A$1) |
Returns
Type | Description |
---|---|
System.String | The cell address in the format A1 |
GetColumnLetter(Int32)
Returns the character representation of the numbered column
Declaration
protected static string GetColumnLetter(int iColumnNumber)
Parameters
Type | Name | Description |
---|---|---|
System.Int32 | iColumnNumber | The number of the column |
Returns
Type | Description |
---|---|
System.String | The letter representing the column |
GetFullAddress(String, String)
Get the full address including the worksheet name
Declaration
public static string GetFullAddress(string worksheetName, string address)
Parameters
Type | Name | Description |
---|---|---|
System.String | worksheetName | The name of the worksheet |
System.String | address | The address |
Returns
Type | Description |
---|---|
System.String | The full address |
IsValidCellAddress(String)
Checks that a cell address (e.g. A5) is valid.
Declaration
public static bool IsValidCellAddress(string cellAddress)
Parameters
Type | Name | Description |
---|---|---|
System.String | cellAddress | The alphanumeric cell address |
Returns
Type | Description |
---|---|
System.Boolean | True if the cell address is valid |
TranslateFromR1C1(String, Int32, Int32)
Translates a R1C1 to an absolut address/Formula
Declaration
public static string TranslateFromR1C1(string value, int row, int col)
Parameters
Type | Name | Description |
---|---|---|
System.String | value | Address |
System.Int32 | row | Current row |
System.Int32 | col | Current column |
Returns
Type | Description |
---|---|
System.String | The RC address |
TranslateToR1C1(String, Int32, Int32)
Translates a absolut address to R1C1 Format
Declaration
public static string TranslateToR1C1(string value, int row, int col)
Parameters
Type | Name | Description |
---|---|---|
System.String | value | R1C1 Address |
System.Int32 | row | Current row |
System.Int32 | col | Current column |
Returns
Type | Description |
---|---|
System.String | The absolut address/Formula |