AddressHelper
in package
Table of Contents
Constants
- R1C1_COORDINATE_REGEX = '/(R((?:\[-?\d*\])|(?:\d*))?)(C((?:\[-?\d*\])|(?:\d*))?)/i'
Methods
- convertFormulaToA1() : string
- Converts a formula that uses R1C1/SpreadsheetXML format cell address to an A1 format cell address.
- convertToA1() : string
- Converts an R1C1 format cell address to an A1 format cell address.
- convertToR1C1() : string
- Converts an A1 format cell address to an R1C1 format cell address.
- getRowAndColumnChars() : array<string|int, string>
- convertSpreadsheetMLFormula() : string
Constants
R1C1_COORDINATE_REGEX
public
mixed
R1C1_COORDINATE_REGEX
= '/(R((?:\[-?\d*\])|(?:\d*))?)(C((?:\[-?\d*\])|(?:\d*))?)/i'
Methods
convertFormulaToA1()
Converts a formula that uses R1C1/SpreadsheetXML format cell address to an A1 format cell address.
public
static convertFormulaToA1(string $formula[, int $currentRowNumber = 1 ][, int $currentColumnNumber = 1 ]) : string
Parameters
- $formula : string
- $currentRowNumber : int = 1
- $currentColumnNumber : int = 1
Return values
stringconvertToA1()
Converts an R1C1 format cell address to an A1 format cell address.
public
static convertToA1(string $address[, int $currentRowNumber = 1 ][, int $currentColumnNumber = 1 ][, bool $useLocale = true ]) : string
Parameters
- $address : string
- $currentRowNumber : int = 1
- $currentColumnNumber : int = 1
- $useLocale : bool = true
Return values
stringconvertToR1C1()
Converts an A1 format cell address to an R1C1 format cell address.
public
static convertToR1C1(string $address[, int|null $currentRowNumber = null ][, int|null $currentColumnNumber = null ]) : string
If $currentRowNumber or $currentColumnNumber are provided, then the R1C1 address will be formatted as a relative address.
Parameters
- $address : string
- $currentRowNumber : int|null = null
- $currentColumnNumber : int|null = null
Return values
stringgetRowAndColumnChars()
public
static getRowAndColumnChars() : array<string|int, string>
Return values
array<string|int, string>convertSpreadsheetMLFormula()
protected
static convertSpreadsheetMLFormula(string $formula) : string
Parameters
- $formula : string