ScriptHello everyone,
Here is my database:
I would like to be able to delete all the columns (from the 4th to the last column).
I am using the following script but it is not working properly.
<SPAN>dt22 = current data table();</SPAN><BR /><BR />max = N cols(dt22);<BR />
For (i=4 , i <= max , i++,
dt22 << delete columns(i);
);
Thank you for your answers !
Automation and ScriptingRe: ScriptEasiest is most likely to use list of columns to remove with Delete Columns
Names Default To Here(1);
dt = Open("$SAMPLE_DATA/Semiconductor Capability.jmp");
col_names = dt << Get Column Names("String");
Remove From(col_names, 1, 4);
wait(2); // for demo purposes
dt << Delete Columns(col_names);
If you want to use For loop, loop from the end to avoid issues with indices changing.