sum function of updated cells is returning 0 in linux

Mar 4, 2009 at 8:07 PM
I found http://www.codeplex.com/PHPExcel/Thread/View.aspx?ThreadId=33773 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.
Developer
Mar 5, 2009 at 12:02 AM
Sounds strange that you are getting different result on Windows/Linux. Do you have some code? Maybe we can better understand?

Coordinator
Mar 5, 2009 at 8: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
Coordinator
Mar 5, 2009 at 8: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:
SUM('1','1','2','3','5','8')
will return 0
while
SUM(1,1,2,3,5,8)
will return 20
Mar 5, 2009 at 9: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.
Thanks.