Hi,
A couple of notes (Sorry, I don't have the time right now to provide a complete solution)
1) Specify the format of the output of the "Column Get Names" function as text by replacing the second line of your code with:
ColNamesList = dt << Get Column Names(string); you won't need to use the statement "Char" function in your code below
2) When deleting an unknown number of columns, it is best to start from the last column and to progress backward:
For (i = NCols, i>=1, i--, ....
3) You may want to simplify your delete line of code by simply using: dt << Delete Column (Column (i))
Best,
TS
Thierry R. Sornasse