Class R1C1Translator
Translate addresses between the R1C1 and A1 notation
Inheritance
Inherited Members
Namespace: OfficeOpenXml.Core
Assembly: EPPlus.dll
Syntax
public static class R1C1Translator
Methods
FromR1C1(String, Int32, Int32, Boolean)
Translate an address from R1C1 to A1
Declaration
public static string FromR1C1(string r1C1Address, int row, int col, bool rollIfOverflow = false)
Parameters
Type | Name | Description |
---|---|---|
System.String | r1C1Address | The address |
System.Int32 | row | The row of the cell to calculate from |
System.Int32 | col | The column of the cell to calculate from |
System.Boolean | rollIfOverflow | If row or col exceeds the maximum value the row/col will start over from 1 |
Returns
Type | Description |
---|---|
System.String | The address in A1 notation |
FromR1C1Formula(String, Int32, Int32, Boolean)
Translate addresses in a formula from R1C1 to A1
Declaration
public static string FromR1C1Formula(string formula, int row, int col, bool rollIfOverflow = false)
Parameters
Type | Name | Description |
---|---|---|
System.String | formula | The formula |
System.Int32 | row | The row of the cell to calculate from |
System.Int32 | col | The column of the cell to calculate from |
System.Boolean | rollIfOverflow | If row or col exceeds the maximum value the row/col will start over from 1 |
Returns
Type | Description |
---|---|
System.String | The formula in A1 notation |
ToR1C1(ExcelAddressBase, Int32, Int32)
Translate an address from A1 to R1C1
Declaration
public static string ToR1C1(ExcelAddressBase address, int row, int col)
Parameters
Type | Name | Description |
---|---|---|
ExcelAddressBase | address | The address |
System.Int32 | row | The row of the cell to calculate from |
System.Int32 | col | The column of the cell to calculate from |
Returns
Type | Description |
---|---|
System.String | The address in R1C1 notation |
ToR1C1Formula(String, Int32, Int32)
Translate addresses in a formula from A1 to R1C1
Declaration
public static string ToR1C1Formula(string formula, int row, int col)
Parameters
Type | Name | Description |
---|---|---|
System.String | formula | The formula |
System.Int32 | row | The row of the cell to calculate from |
System.Int32 | col | The column of the cell to calculate from |
Returns
Type | Description |
---|---|
System.String | The formula in R1C1 notation |