
Hello
First of all I want to apologize for my English and caused worry. I hope understand me. The situation is as follows.
I have an Excel file with 3 sheets. Sheet2 and Sheet3 fill them with data returned from database. Sheet1 be completed according to the data in the other two sheets. The calculations are performed in Excel. PHP only submit data to Excel and output final Excel
file. In Sheet1 using formulas such as SUM, IF, SUMIF.
example: A1 = SUMIF (Sheet2! L1:L10; "<>2"; (Sheet2!F1: F10))
Experience and thus: $objPHPExcel>getActiveSheet()>setCellValue ('A1', '= SUMIF (Sheet2!L1: L10, "<> 2", (Sheet2!F1:F10))'); but this does not work.
In Excel 2007 it works. The problem comes with Excel5.
Will be glad of your help. Thank you in advance.


Developer
Mar 13, 2009 at 8:38 PM

It looks like you have some white space which should be removed. Instead of this:
$objPHPExcel>getActiveSheet()>setCellValue ('A1', '= SUMIF (Sheet2!L1: L10, "<> 2", (Sheet2!F1:F10))');
use this:
$objPHPExcel>getActiveSheet()>setCellValue ('A1', '= SUMIF(Sheet2!L1:L10, "<> 2", (Sheet2!F1:F10))');
I tried and it seemed to worked with Excel5 writer!
For some reason MS Office Excel 2007 does not mind about the white spaces, but OpenOffice.org 3 apparently does.

