转换为C#的Excel公式返回NaN

时间:2017-03-25 08:23:22

标签: c# excel formula

我在excel表中有公式,返回$ 205.03。我将公式转换为C#代码并生成NaN。 C# Example on dotnetfiddle
Excel公式计算结果

Excel公式:=IFERROR((principalX3/(((1+(1+interestX3*1/12)^(12)-1)^(1/12))^(0) * ((1+(1+interestX3*1/12)^(12)-1)^(1/12))^(0))-0/((1+(1+interestX3*1/12)^(12)-1)^(1/12)-(1+(1+0*1/12)^(12)-1)^(1/12))*((1-((1+(1+interestX3*1/12)^(12)-1)^(1/12))^(-repaymentsX5)*((1+(1+0*1/12)^(12)-1)^(1/12))^(repaymentsX5))/((1+(1+interestX3*1/12)^(12)-1)^(1/12)-(1+(1+0*1/12)^(12)-1)^(1/12))-repaymentsX5*((1+(1+interestX3*1/12)^(12)-1)^(1/12))^(-repaymentsX5)))/(1*(1-0)*(1-0)*(1-((1+(1+interestX3*1/12)^(12)-1)^(1/12))^(-repaymentsX5)*((1+(1+0*1/12)^(12)-1)^(1/12))^(repaymentsX5))/((1+(1+interestX3*1/12)^(12)-1)^(1/12)-(1+(1+0*1/12)^(12)-1)^(1/12))),"")

0 个答案:

没有答案