reading and xlsx with a french formula

Topics: User Forum
Oct 16, 2013 at 11:20 AM
HI everybody,
The reader for Excel 2007 falls into error when it encounters this formula which is written in french :
=SI($C24="";" ";RECHERCHEV(C:C;TABREF!A:C;2;0))
where TABREF refers to the second tab of the worksheet.
I don't want to change this formula in the cell. I just want to feed some other cells with data.
the error message is :
<b>Fatal error</b>: Uncaught exception 'Exception' with message 'NCR!H24 -> Invalid cell coordinate A' in /var/www/html/phpexcel/Classes/PHPExcel/Cell.php:293
It seems the getcalculatedvalue function doesn't support this syntax.
Can someone help ?
Oct 17, 2013 at 9:19 AM
Edited Oct 17, 2013 at 2:04 PM
You can work around the problem with $objWriter->setPreCalculateFormulas(false);

Edit : The problem is related to the style of references used, not to the fact that in French: in the Excel file, the function is in English, however you will have difficulties if you try with PHPExcel, define a formula in French.
Oct 17, 2013 at 7:43 PM
Thanks a lot for your quick and efficient help. your workaround works fine.
Oct 22, 2013 at 11:22 AM
If you read the section of the developer documentation on locale settings, it will explain that formulae are maintained internally in US English, but that there are helper functions provided for setting/reading formulae in (I believe currently) 14 different languages including French
Oct 22, 2013 at 1:54 PM
Thanks Mark but LWol's answer was sharp and judicious. As far as I am concerned, this topic is closed (sorry I don't know how to close a topic).