public function PHPExcel_Calculation::_translateFormulaToLocale in Loft Data Grids 6.2
Same name and namespace in other branches
- 7.2 vendor/phpoffice/phpexcel/Classes/PHPExcel/Calculation.php \PHPExcel_Calculation::_translateFormulaToLocale()
File
- vendor/
phpoffice/ phpexcel/ Classes/ PHPExcel/ Calculation.php, line 2088
Class
- PHPExcel_Calculation
- PHPExcel_Calculation (Multiton)
Code
public function _translateFormulaToLocale($formula) {
if (self::$functionReplaceFromExcel === NULL) {
self::$functionReplaceFromExcel = array();
foreach (array_keys(self::$_localeFunctions) as $excelFunctionName) {
self::$functionReplaceFromExcel[] = '/(@?[^\\w\\.])' . preg_quote($excelFunctionName) . '([\\s]*\\()/Ui';
}
foreach (array_keys(self::$_localeBoolean) as $excelBoolean) {
self::$functionReplaceFromExcel[] = '/(@?[^\\w\\.])' . preg_quote($excelBoolean) . '([^\\w\\.])/Ui';
}
}
if (self::$functionReplaceToLocale === NULL) {
self::$functionReplaceToLocale = array();
foreach (array_values(self::$_localeFunctions) as $localeFunctionName) {
self::$functionReplaceToLocale[] = '$1' . trim($localeFunctionName) . '$2';
}
foreach (array_values(self::$_localeBoolean) as $localeBoolean) {
self::$functionReplaceToLocale[] = '$1' . trim($localeBoolean) . '$2';
}
}
return self::_translateFormula(self::$functionReplaceFromExcel, self::$functionReplaceToLocale, $formula, ',', self::$_localeArgumentSeparator);
}