Simple SUM functions not calculating in final spreadsheet

Topics: Developer Forum, User Forum
Mar 23, 2010 at 2:07 PM

I upgraded to v 1.7.2 from an ancient 1.5.x release version. Suddenly my resulting spreadsheets with simple summation functions show the SUM text and not the result of the execution of the summation.

For example, I now see:

=SUM(G11:G21) in the cell.  If i manually edit the cell and simply hit ENTER on the summation formula, it does the summation.


Any tips to rectify this?

Mar 23, 2010 at 6:02 PM

I see that others have had this problem as well (going back a few versions even).  The issue is identical for me -- you must "touch" the cell through either double clicking or editing and hitting enter to activate the execution of the function.



Mar 23, 2010 at 6:33 PM

Well, looks like with some brute force, I've figured out what the problem is.

This issue happens when the code I have was setting the cell type to a string using setDataType(PHPExcel_Cell_DataType::TYPE_STRING).

This was done AFTER i already put the cell's value to be the formula shown in the first thread post.

I removed that line and now the summation formula now works properly.  Hopefully this helps others as well.