Class ExcelCellBase¶
Namespace: OfficeOpenXml
Assembly: EPPlus.dll
Base class containing cell address manipulating methods.
Inheritance¶
Derived¶
Inherited Members¶
object.Equals(object?, object?)
object.Equals(object?)
object.GetHashCode()
object.GetType()
object.MemberwiseClone()
object.ReferenceEquals(object?, object?)
object.ToString()
Constructors¶
ExcelCellBase()¶
Methods¶
GetAddress(int, int)¶
Returns the AlphaNumeric representation that Excel expects for a Cell Address
Parameters¶
Row int
The number of the row
Column int
The number of the column in the worksheet
Returns¶
The cell address in the format A1
GetAddress(int, bool, int, bool)¶
Returns the AlphaNumeric representation that Excel expects for a Cell Address
Parameters¶
Row int
The number of the row
AbsoluteRow bool
Absolute row
Column int
The number of the column in the worksheet
AbsoluteCol bool
Absolute column
Returns¶
The cell address in the format A1
GetAddress(int, int, bool)¶
Returns the AlphaNumeric representation that Excel expects for a Cell Address
Parameters¶
Row int
The number of the row
Column int
The number of the column in the worksheet
Absolute bool
Get an absolute address (\(A\)1)
Returns¶
The cell address in the format A1
GetAddress(int, int, int, int)¶
Returns the AlphaNumeric representation that Excel expects for a Cell Address
Parameters¶
FromRow int
From row number
FromColumn int
From column number
ToRow int
To row number
ToColumn int
From column number
Returns¶
The cell address in the format A1
GetAddress(int, int, int, int, bool)¶
Returns the AlphaNumeric representation that Excel expects for a Cell Address
public static string GetAddress(int FromRow, int FromColumn, int ToRow, int ToColumn, bool Absolute)
Parameters¶
FromRow int
From row number
FromColumn int
From column number
ToRow int
To row number
ToColumn int
From column number
Absolute bool
if true address is absolute (like \(A\)1)
Returns¶
The cell address in the format A1
GetAddress(int, int, int, int, bool, bool, bool, bool)¶
Returns the AlphaNumeric representation that Excel expects for a Cell Address
public static string GetAddress(int FromRow, int FromColumn, int ToRow, int ToColumn, bool FixedFromRow, bool FixedFromColumn, bool FixedToRow, bool FixedToColumn)
Parameters¶
FromRow int
From row number
FromColumn int
From column number
ToRow int
To row number
ToColumn int
From column number
FixedFromRow bool
FixedFromColumn bool
FixedToRow bool
FixedToColumn bool
Returns¶
The cell address in the format A1
GetAddressCol(int, bool)¶
Get the columnn address for the column
Parameters¶
Col int
The column
Absolute bool
If the column is absolute. Adds a $ before the address if true
Returns¶
GetAddressRow(int, bool)¶
Get the row number in text
Parameters¶
Row int
The row
Absolute bool
If the row is absolute. Adds a $ before the address if true
Returns¶
GetColumnLetter(int)¶
Returns the character representation of the numbered column
Parameters¶
iColumnNumber int
The number of the column
Returns¶
The letter representing the column
GetColumnLetter(int, bool)¶
Returns the character representation of the numbered column
Parameters¶
iColumnNumber int
The number of the column
fixedCol bool
True for fixed column
Returns¶
The letter representing the column
GetFullAddress(string, string)¶
Get the full address including the worksheet name
Parameters¶
worksheetName string
The name of the worksheet
address string
The address
Returns¶
The full address
GetFullAddress(string, string, string)¶
Get the full address including the worksheet name
Parameters¶
workbook string
The workbook, if other than current
worksheetName string
The name of the worksheet
address string
The address
Returns¶
The full address
IsSimpleAddress(string)¶
If the address is a address is a cell or range address of format A1 or A1:A2, without specified worksheet name.
Parameters¶
address string
the address
Returns¶
True if valid.
IsValidAddress(string)¶
Returns true if the range or table address is valid
Parameters¶
address string
The address to check
Returns¶
Return true if the address is valid
IsValidCellAddress(string)¶
Checks that a cell address (e.g. A5) is valid.
Parameters¶
cellAddress string
The alphanumeric cell address
Returns¶
True if the cell address is valid
IsValidRangeAddress(string)¶
Returns true if the range is valid
Parameters¶
address string
The address to check
Returns¶
Return true if the address is valid
IsValidTableAddress(string)¶
Returns true if the address is a valid table address. I.e table1[], table1[[#this row],[column1]]
Parameters¶
address string
Returns¶
TranslateFromR1C1(string, int, int)¶
Translates a R1C1 to an absolut address/Formula
Parameters¶
value string
Address
row int
Current row
col int
Current column
Returns¶
The RC address
TranslateToR1C1(string, int, int)¶
Translates a absolut address to R1C1 Format
Parameters¶
value string
R1C1 Address
row int
Current row
col int
Current column
Returns¶
The absolut address/Formula