Can't find column names in delimited text file

Hello All,

I'm an intermediate user of Igor pro and I can't figure this easy problem out and it's bugging me.

I have a tab delimited text file that I'm writing an ipf for so that each column can be loaded as a wave and the name of each wave is in the header of the file. Sounds easy right? I can't find the right combinations of flags on LoadWave to get the columnnames to be recognized. I have an example of the txt file im using.

What am I doing wrong? Loadwaves either uses the first line of the file for column names which isn't right or it just gives up and says wave0, wave1, etc. I've used this function in more complicated functions and never had an issue.

Puneet
example_0.txt (3.66 KB)
The problem is that # is not a legal character in a column name.

One solution is to change the # character to something else, such as N. Then you can load with this command:
LoadWave/G/D/W/E=1/L={1,2,0,0,0} ""


Another solution is to specify the column names in the load command itself, like this:
Function Test()
    String columnInfoStr = ""
    columnInfoStr += "N=secs;"
    columnInfoStr += "N=rfTotal;"
    columnInfoStr += "N=rfPM1;"
    columnInfoStr += "N=rfPM2_5;"
    columnInfoStr += "N=rfPM4;"
    columnInfoStr += "N=rfPM10;"
    columnInfoStr += "N=N1182;"
    columnInfoStr += "N=N1188;"
    columnInfoStr += "N=N1197;"
    LoadWave/G/D/W/E=1/L={1,2,0,0,0}/B=columnInfoStr ""
End



Thank you very much. I should have figured that out. Can you tell me how I can modify that file through IGOR so I can replace any "#" characters with a different string?

Puneet
Never mind, I think I can figure that out by extracting the header line and parsing it to find the column names.
Thanks!