Hi @Rans ,
If you open the file with JMP and deselct the box "Use default program to open. Uncheck to open as text." and then select the radio button "Data (Using Preview)"; be sure to select all files (*.*) in the JMP open window.
You can then select some of the important delimiters and other things, including which row the data starts, so if there are two rows as headers, you would skip one and then set the data starts to line 3 or whatever it is.
You can then open up the "Source" script in the data table and edit the Import settings as needed and use this script in your JSL program.
Alternatively, if you can re-save it as an XLSX file, then you can use the Open() command and define which tab to open, which column to start/stop with, and which row to start/stop with as well as having multiple rows as header. That should solve your problem of having to re-name the columns.
The last option I'd mention is that if you know what the column names and they don't change, then in your script, you can have a list ColNames ={"...", "...",...} with all the correct names in quotations separated by commas in the list. Then, after loading the CSV file, you can run a For Loop to rename each column according to the entries in ColNames. For example:
dt=Current data table();//or whatever your data table name is.
icols=.;//variable to count through the columns
For(icols=1, icols<=N Columns(dt), icols++,
Column(dt, icols) <<Set Name(ColNames[icols]) //this sets the column name to the "icols-th" entry of the list ColNames
);
Hope one of these helps!
Good luck,
DS