Hello,
I'm using microsoft.office.interop.excel dll in my application .
when I execute the evaluation function with the below formula : =IF(100000>15000,20%,IF(100000>12500,17.5%,IF(100000>10000,15%,IF(100000>7500,12.5%,IF(100000>5000,10%,0)))))*IF((AND(40>=20,23>=30)),15,2000)*LOG(IF(AND(3<>0,(1/3)>0.5),1000,2000))/IF(90<>0, IF((1/90)>0.5, 123456, 987654), 987654)-550-IF((OR(25>=20, 1000>=30)), 5000, 900) .
I get a code error -2146826273. I test the formula using excel sheet and it worked perfectly. Please find below the executed code.
public dynamic EvaluteFormula(string expressionFormula)
{
Application excelApp = new Application();
return excelApp.Evaluate(expressionFormula);
}
When I minimize the formula length by removing operators, it works perfectly. Has anyone ideas how to solve this problem ?
Thanks!