Class ExcelCellBase
- Namespace
- OfficeOpenXml
- Assembly
- EPPlus.dll
Base class containing cell address manipulating methods.
public abstract class ExcelCellBase
- Inheritance
-
ExcelCellBase
- Derived
- Inherited Members
Constructors
ExcelCellBase()
protected ExcelCellBase()
Methods
GetAddress(int, bool, int, bool)
Returns the AlphaNumeric representation that Excel expects for a Cell Address
public static string GetAddress(int Row, bool AbsoluteRow, int Column, bool AbsoluteCol)
Parameters
RowintThe number of the row
AbsoluteRowboolAbsolute row
ColumnintThe number of the column in the worksheet
AbsoluteColboolAbsolute column
Returns
- string
The cell address in the format A1
GetAddress(int, int)
Returns the AlphaNumeric representation that Excel expects for a Cell Address
public static string GetAddress(int Row, int Column)
Parameters
Returns
- string
The cell address in the format A1
GetAddress(int, int, bool)
Returns the AlphaNumeric representation that Excel expects for a Cell Address
public static string GetAddress(int Row, int Column, bool Absolute)
Parameters
RowintThe number of the row
ColumnintThe number of the column in the worksheet
AbsoluteboolGet an absolute address ($A$1)
Returns
- string
The cell address in the format A1
GetAddress(int, int, int, int)
Returns the AlphaNumeric representation that Excel expects for a Cell Address
public static string GetAddress(int FromRow, int FromColumn, int ToRow, int ToColumn)
Parameters
FromRowintFrom row number
FromColumnintFrom column number
ToRowintTo row number
ToColumnintFrom column number
Returns
- string
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
FromRowintFrom row number
FromColumnintFrom column number
ToRowintTo row number
ToColumnintFrom column number
Absoluteboolif true address is absolute (like $A$1)
Returns
- string
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
FromRowintFrom row number
FromColumnintFrom column number
ToRowintTo row number
ToColumnintFrom column number
FixedFromRowboolFixedFromColumnboolFixedToRowboolFixedToColumnbool
Returns
- string
The cell address in the format A1
GetAddressCol(int, bool)
Get the columnn address for the column
public static string GetAddressCol(int Col, bool Absolute = false)
Parameters
Returns
GetAddressRow(int, bool)
Get the row number in text
public static string GetAddressRow(int Row, bool Absolute = false)
Parameters
Returns
GetColumnLetter(int)
Returns the character representation of the numbered column
protected static string GetColumnLetter(int iColumnNumber)
Parameters
iColumnNumberintThe number of the column
Returns
- string
The letter representing the column
GetColumnLetter(int, bool)
Returns the character representation of the numbered column
protected static string GetColumnLetter(int iColumnNumber, bool fixedCol)
Parameters
Returns
- string
The letter representing the column
GetFullAddress(string, string)
Get the full address including the worksheet name
public static string GetFullAddress(string worksheetName, string address)
Parameters
Returns
- string
The full address
GetFullAddress(string, string, string)
Get the full address including the worksheet name
public static string GetFullAddress(string workbook, string worksheetName, string address)
Parameters
workbookstringThe workbook, if other than current
worksheetNamestringThe name of the worksheet
addressstringThe address
Returns
- string
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.
public static bool IsSimpleAddress(string address)
Parameters
addressstringthe address
Returns
- bool
True if valid.
IsValidAddress(string)
Returns true if the range or table address is valid
public static bool IsValidAddress(string address)
Parameters
addressstringThe address to check
Returns
- bool
Return true if the address is valid
IsValidCellAddress(string)
Checks that a cell address (e.g. A5) is valid.
public static bool IsValidCellAddress(string cellAddress)
Parameters
cellAddressstringThe alphanumeric cell address
Returns
- bool
True if the cell address is valid
IsValidRangeAddress(string)
Returns true if the range is valid
public static bool IsValidRangeAddress(string address)
Parameters
addressstringThe address to check
Returns
- bool
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]]
public static bool IsValidTableAddress(string address)
Parameters
addressstring
Returns
TranslateFromR1C1(string, int, int)
Translates a R1C1 to an absolut address/Formula
public static string TranslateFromR1C1(string value, int row, int col)
Parameters
Returns
- string
The RC address
TranslateToR1C1(string, int, int)
Translates a absolut address to R1C1 Format
public static string TranslateToR1C1(string value, int row, int col)
Parameters
Returns
- string
The absolut address/Formula