sum function of updated cells is returning 0 in linux

Mar 4, 2009 at 7:07 PM
I found but my problem seems a little different.  I have a simple excel worksheet that inserts 10 numbers into the worksheet and a preexisting =SUM(B3:B12) is on the worksheet which calculates the numbers that were inserted.  The 10 numbers existed before and were updated to new values.
In windows the sum is calculated correctly.  In linux, the value returns as 0.  Sums that sum existing data that was not inserted into the updated workbook to return correctly.  Any ideas?  
Excel2007 reader and writter.
Mar 4, 2009 at 11:02 PM
Sounds strange that you are getting different result on Windows/Linux. Do you have some code? Maybe we can better understand?

Mar 5, 2009 at 7:51 AM
It shouldn't make a difference what platform you're working on, but watch out for calculation caching if you're calculating a value, modifying data, then recalculating

Use PHPExcel_Calculation::getInstance()->setCalculationCacheEnabled(False) to turn off calculation caching
Mar 5, 2009 at 7:50 PM
Another point to watch out for is the PHP datatype of the values that are being summed.
Following Excel rules, string data (even when it holds a numeric value) is not included in the SUM calculation, so:
will return 0
will return 20
Mar 5, 2009 at 8:26 PM
Your last comment has fixed the problem.  I was inserting all data into the worksheet with "" . $value.  I removed the "" in front and it now works on both linux and windows.  I originally put the "" in front because if I remember right, 0's were displaying as blank.  I checked in both windows and linux and 0's are inserted correctly and sums are now correct too.