Hi Fmedina,
Sorry for the delay in getting you.
The code var = ws.Range(r, c).Value gives Formula string,as the Value property gets or sets the variant and not the number value.
The error while using the above code may occur if XlsIO doesnot support that particular formula.
Here is the code to read the value from a cell that contains formula.
string str=sheet.Range["A3"].FormulaNumberValue.ToString()
Please see the attachment and let me know if you need any further assistance.
ReadFormulaValue.zip
BestRegards,
Bharath