I had a look at your spreadsheet, it appears to me to work fine, but it
does return an NPV of zero, which I suppose is not what you expect.
You have not set the evaluation date, which means that it defaults to
today. The deal expires in the past which is why it has a value of
zero. If you set the expiration date into the future then the PV
In general you need to make a call to qlSettingsSetEvaluationDate() to
set the evaluation date, and you need to make sure that all of your
other processing depends on (comes after) that call.
The safest way to do that is to make the call in VBA code, after loading
the XLL, but before loading your spreadsheet: