Year, Month, and Day parameters describe an un-representable DateTime. Keep getting this exception when trying to calculate Excel YIELD function
Consider the following code
using (var wb = new Workbook())
{
var ws = wb.Worksheets[0];
try
{
var str = "=YIELD(DATE(2017,3,31), DATE(2018,5,31),0.12,100,100,4)"
var q = ws.CalculateFormula(str);
return double.Parse(q.ToString());
}
}
When plugging the formula directly onto Excel, this formula should return 11.99%
Anybody knows why this happens and how to work around it? Thanks.
After an initial test, I am able to observe the issue as you mentioned by using your sample code. I found an exception “Year, Month, and Day parameters describe an un-representable DateTime.” occurred when calculating the valid formula ("=YIELD"). If I paste the formula into MS Excel directly, it works fine. I have logged a ticket with an id “CELLSNET-45485” for your issue. We will look into it figure it out soon.
Once we have an update on it, we will let you know here.
The issues you have found earlier (filed as CELLSNET-45485) have been fixed in this update. This message was posted using BugNotificationTool from Downloads module by Amjad_Sahi