private static function PHPExcel_Calculation::_translateFormula in Loft Data Grids 6.2
Same name and namespace in other branches
- 7.2 vendor/phpoffice/phpexcel/Classes/PHPExcel/Calculation.php \PHPExcel_Calculation::_translateFormula()
2 calls to PHPExcel_Calculation::_translateFormula()
- PHPExcel_Calculation::_translateFormulaToEnglish in vendor/phpoffice/phpexcel/Classes/PHPExcel/Calculation.php
- PHPExcel_Calculation::_translateFormulaToLocale in vendor/phpoffice/phpexcel/Classes/PHPExcel/Calculation.php
File
- vendor/phpoffice/phpexcel/Classes/PHPExcel/Calculation.php, line 2055
Class
- PHPExcel_Calculation
- PHPExcel_Calculation (Multiton)
Code
private static function _translateFormula($from, $to, $formula, $fromSeparator, $toSeparator) {
if (self::$_localeLanguage !== 'en_us') {
$inBraces = FALSE;
if (strpos($formula, '"') !== FALSE) {
$temp = explode('"', $formula);
$i = FALSE;
foreach ($temp as &$value) {
if ($i = !$i) {
$value = preg_replace($from, $to, $value);
$value = self::_translateSeparator($fromSeparator, $toSeparator, $value, $inBraces);
}
}
unset($value);
$formula = implode('"', $temp);
}
else {
$formula = preg_replace($from, $to, $formula);
$formula = self::_translateSeparator($fromSeparator, $toSeparator, $formula, $inBraces);
}
}
return $formula;
}