Hi, i have this formula in an excel sheet
=SI($C12=0;"";SI($C12=1;IMPORTARDATOSDINAMICOS(“Soles”;$D$10;“Mes”;AP$6;“Supervisor”;$D12);SI($C12=2;IMPORTARDATOSDINAMICOS(“Soles”;$D$10;“Mes”;AP$6;“Supervisor”;$D12;“Mesa”;$E12);IMPORTARDATOSDINAMICOS(“Soles”;$D$10;“Mes”;AP$6;“Supervisor”;$D12;“Mesa”;$E12;“NombreVendedor”;$F12))))
I can read the formula from aspoce cells:
Cell _cell = ws.Cells[“AG3”];
string q = _cell.Formula;
// q = =IF($C12=0,"",IF($C12=1,GETPIVOTDATA(“Soles”,$D$10,“Mes”,AP$6,“Supervisor”,$D12),IF($C12=2,GETPIVOTDATA(“Soles”,$D$10,“Mes”,AP$6,“Supervisor”,$D12,“Mesa”,$E12),GETPIVOTDATA(“Soles”,$D$10,“Mes”,AP$6,“Supervisor”,$D12,“Mesa”,$E12,“NombreVendedor”,$F12))))
if i use CalculateFormula:
var results = ws.CalculateFormula(q);
// results = #REF!
But if i go to excel and hit f2 + enter then it works
Why is the difference?
Is it a trial limitation?
Or do i have to do something else?