EPPlus Value not extracted after calling calculate function

T.Zacks 3,996 Reputation points
2021-03-06T14:42:15.943+00:00

I have set formula into cell and after setting formula value is showing when opening the excel file but when i try to get value from the cell where formula has been set then i am getting empty value after using Calculate() function.

my formula looks like IF(E4="","",IF(B4=0,"",IF(E4=0,"",IF(B4="","",IF(B4<0,-(E4/B4-1),(E4/B4-1))))))

when i use calculate function

if (ws.Cells[DeltaPercentagePeriod].Formula != "")
{
     ws.Cells[DeltaPercentagePeriod].Calculate();
     ws.Cells[DeltaPercentagePeriod].Value  //getting empty value                 

}

where i made the mistake for which i am not getting value ? please help me. thanks

Developer technologies C#
{count} votes

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.