PHP_Calculation_Exception - 可能与德语版的Excel版本有关

I am using a German Excel Version and wrote following formula into Cell AM27:

=WENNFEHLER(AN61/(AN$61+AN$62+AN$63);"")

This correspondends to the English formular:

=iferror(AM61/(AM$61+AM$62+AM$63),"")

Now I am loading and saving the file with PHPExcel and get this exception:

PHPExcel_Calculation_Exception: MySheetName!AN27 -> Formula Error: Unexpected ,

My questions are

  1. Does the same error happen when one uses an English Excel Version and the English formular?
  2. Is there a way how I can solve this exception?
  3. Or can I work on other parts of the sheetand save the file without calculating this cell?

Thanks for your help!

Section 4.6.4 of the developer documentation:

When writing a formula to a cell:

  • Decimal separator is . (period)
  • Function argument separator is , (comma)
  • Matrix row separator is ; (semicolon)
  • English function names must be used

e.g.

$objPHPExcel->getActiveSheet()
    ->setCellValue(
        'AM27',
        '=IFERROR(AM61/(AM$61+AM$62+AM$63),"")'
    );

If you want to write formulae using German language function names and separators, you need to use the locale functions to handle translation between German and English (as described in section 4.6.5 of the developer documentation):

$locale = 'de';
$validLocale = PHPExcel_Settings::setLocale($locale);

$objPHPExcel->getActiveSheet()
    ->setCellValue(
        'AM27',
        PHPExcel_Calculation::getInstance()
            ->translateFormulaToEnglish(
                '=WENNFEHLER(AM61/(AM$61+AM$62+AM$63);"")'
            )
    );