The remove command is used to delete columns from a table.
remove v : Remove specified rows or columns from a table.
remove range
The example script below, shows four methods for targeting specific columns to be removed:
01 | tell selectedTable | |
02 | -- identify the target column by position | |
03 | remove last column | |
04 | ||
05 | -- identify the target column by index | |
06 | remove column 2 | |
07 | ||
08 | -- identify the target column by name | |
09 | remove column "MAX" | |
10 | ||
11 | -- identity the target column(s) from selection range | |
12 | set theseColumns to every column of selection range | |
13 | repeat with i from 1 to the count of theseColumns | |
14 | remove (item i of theseColumns) | |
15 | end repeat | |
16 | end tell |