Origin Ver.: 8.6.0G
Operating System: Windows 7 Professional
Hi Guys,
I'm trying to define a variable, which tells me in which column a certain longname header is positioned.
For example: I have a column with the longname header "Line_Point_No". Now I want to know which column number this Column has.
This is the script I use:
range rWb = !; // Use the active worksheet as a range
NumColumns = rWb.ncols; //get the number of columns in worksheet
NumColumns =;
167 //number of cols is 167
//search for longname header and save columnnumber in lineno$
int ii=0;
for(ii=0; ii<=NumColumns; ii++)
{
if ([%H]SortedData!col(ii+1)[L]$ == "Line_Point_No")) ;
}
lineno$=$(ii+1);
lineno$=;
169
the variable lineno$ should be 2 instead of 169(especially because the worksheet has only 167 columns). Does anyone know, what I'm doing wrong?
Thanks,
sebbey