Viewdata problem (most likely my fault)

Topics: User Forum
Sep 22, 2008 at 3:15 AM
I'm a bit of a novice when it comes to php, but my boss has me working on something for a client of ours and I've run into a problem.

I have 2 viewdata entries on the page , 1 displays correctly and the other does not, I have searched through the discussions but haven't found an answer that fixes
he problem I am seeing.

The format is a form is filled out and (mostly) based on question 4 (how much is the gross income...) an amount will be displayed from the excel sheet. At the moment regardless of input it displays "0" after the calulation button is pressed.

I have put my excel and php file in a .rar that can be found here: http://www.iamtheargi.net/flashtest/test.rar
I also have a working copy uploaded here: http://www.iamtheargi.net/flashtest/test.php


Any help would be greatly appreciated, as I am sure that I've missed something that is obvious to someone with more php experience.
Developer
Sep 22, 2008 at 2:34 PM
Thanks for the report. This has been filed in the issue tracker:

http://www.codeplex.com/PHPExcel/WorkItem/View.aspx?WorkItemId=7650

A workaround for you may be to omit arguments 4 and 5 in the PV function. This should give you correct results.

Instead of this:

"=IF(loanterm>0,-PV(C31/12,loanterm*12,C42,,0)/1000,0)"

do like this (argument 5 defaults to 0)

"=IF(loanterm>0,-PV(C31/12,loanterm*12,C42)/1000,0)"
Sep 22, 2008 at 11:26 PM
Work around works a treat, thank you thank you thank you!