I'd like to add a column that is a function of another column, but only to specified worksheets in specified workbooks. Here is the code:
doc -ef W {
doc -e LW { (if(%H == "J10aX" || %H == "J11aX" || %H == "J12aX"
|| %H == "J13aX" || %H == "J14aX" || %H == "J15aX" || %H == "J16aX" || %H == "J17aX"
|| %H == "J18aX");
{ if(wks.name$=="mixed"){
// Add a column
wks.addcol();
// get index of added column
int ncols = wks.ncols;
// set value of this new col
wcol(ncols) = Col(D) * 0.005}}
}};
This code doesn't work. Can someone point out my mistake?