Origin Ver. and Service Release (Select Help-->About Origin): 8.6.0 (64bi)
Operating System: Windows 7
Hi,
I have a couple of "input" Workbooks (in my code i have only the "demo"-Workbook). The names of the workbooks are in an string array. My programm opens a new Workbook and insert a column with values from 580 to 10. The idea is to insert a new column (per input Workbook) into this destination Workbook. The column should be build by the interp1.
My code always raises this failure: "Failed to resolve range string, VarName = iy, VarValue = [demo]1!(Col(1),Col(2))"
Here is my code:
[Main]
string dest$="Auswertung_allPoints";
StringArray src;
src.Add("demo");
newbook sheet:=1 result:=bkn$;
wks.name$=dest$;
page.label$=dest$;
page.longname$=dest$;
range destWks=[dest$]1!;
destWks.col$(1).label$=Y_Equi;
destWks.col$(1).comment$=Equidistante Y Werte;
destWks.col$(1).type=1;
destWks.col$(1).format=1;
for(i=1;i<(5700);i++)
{
double j=580-(i-1)*0.1;
%(destWks)Col(1)[i]$=$(j);
};
loop(count,1,src.GetSize())
{
string srcName$=src.GetAt(count)$;
range srcWks=[srcName$]1!;
int nlast=srcWks.nrows;
for(int ii=nlast;ii>0;ii--)
{
%A=%(srcWks)Col(1)[ii]$;
double aa=%A;
if((aa>88.0) || (aa<80.0))
{
range ra=%(srcWks)[ii];
del ra;
}
};
range iyy=%(srcWks)Col(1);
range iyx=%(srcWks)Col(2);
string srcTable$=src.GetAt(1)$;
interp1 ix:=[Auswertung_allPoints]Auswertung_allPoints!Col(1) iy:=(iyy,iyx) ox:=[Auswertung_allPoints]Auswertung_allPoints!Col(2);
};