Hi,
Please refer to
int ncols = wks.ncols; // get the number of columns
for(ii=1; ii<=ncols; ii++) // loop all columns in the worksheet
{
wks.addcol(); // add a new column for the result
for(jj=1; jj<wks.maxrows; jj++) // loop all rows in the column
{
wcol(ncols+ii)[jj] = (wcol(ii)[jj+1]-wcol(ii)[jj])/(wcol(ii)[jj+1]+wcol(ii)[jj]);
}
}
Penn