Formula

Topics: Developer Forum, User Forum
Mar 11, 2008 at 1:30 PM
Hi,

i need the following formula in a Cell(E9) -> "=IF(K9=1;C9;\"0\")".
But when i write the formula to a cell the Excel file will be broken.
Any idea?

Kind regards,

Freibeuter
Coordinator
Mar 11, 2008 at 2:21 PM
Have you tried:
...->setValue('=IF(K9=1;C9;0)');
Mar 11, 2008 at 2:33 PM
Hi,

i have changed it to:

$objPHPExcel->getActiveSheet()->getCell('E'.$tmp)->setValue('=IF(K9=1;C9;0)');

But this doesn't work, too.

Freibeuter
Mar 12, 2008 at 6:56 AM
No idea anyone?
Coordinator
Mar 12, 2008 at 8:47 PM
Are you using an English Excel version? If yes, can you send me the broken file by e-mail?
Mar 13, 2008 at 8:28 AM
Hi,

i'm using the german Excel version. Does this lead to the problem?
If yes can you write an update for this problem?

Kind regards,

Freibeuter
Mar 13, 2008 at 1:38 PM
Hi,

i found the solution for the problem.
You have to replace the ";" with ",". I have looked into a manual create XLSX File and all "IF-Formulas" where seperated by , instead of ; !
Changeing ; to , worked very well.

Thx for your help Maarten.