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