Skip loaded columns

I am reading in tab-delimited text files using:
LoadWave

Are there any flags I can add to skip columns.
For example if I have columns 0,1,2,3,4,5,6,7,8

But I only want to read in 0,1,4,5,6
What flag would I add?
Cory K wrote:
I am reading in tab-delimited text files using:
LoadWave

Are there any flags I can add to skip columns.
For example if I have columns 0,1,2,3,4,5,6,7,8

But I only want to read in 0,1,4,5,6
What flag would I add?


I realize you have come a long way on your own. I do however suggest that you look at the loader panel and associated tab-delimited file loader that I have written. A picture of the panel is here. In addition to the many features of the input panel itself, the tab delimited loader allows you to select to read only certain columns from a tab-delimited file by typing an easily understood notation into the User Data input area (in this case, [1,2,5-7]).

Download and install the package here as a start.

--
J. J. Weimer
Chemistry / Chemical & Materials Engineering, UAH
To do it through a dialog, Data->Load Data->Load Waves and leave the "Auto name & go" checkbox unchecked. This will display a "Name Waves" dialog that contains a Skip button which you can apply to the columns you can to skip.

To do it programmatically, you can use the LoadWave /B flag. For example:

String columnInfoStr = ""
columnInfoStr += "N=Column0;"
columnInfoStr += "N=Column1;"
columnInfoStr += "C=2,N='_skip_';"   // Skip Column2 and column3
columnInfoStr += "N=Column4;"
columnInfoStr += "N=Column5;"
columnInfoStr += "N=Column6;"
columnInfoStr += "C=2,N='_skip_';"   // Skip Column7 and column8


This is a rather complex flag so read the LoadWave /B documentation carefully.

I have the same question, but in my case I have 329 columns and only need about 20 of them and they are not at the beginning or grouped easily next to each other. I would prefer to do it with code rather than using the GUI. Any suggestions?
Here is how you can do it:
Function/S GetColumnInfoStr(numColumns)
    Variable numColumns     // e.g., 329
   
    String columnInfoStr = ""
   
    Variable columnIndex        // Zero-based
    for(columnIndex=0; columnIndex<numColumns; columnIndex+=1)
        String columnName = "_skip_"
        switch(columnIndex)
            case 3:
                columnName = "Column3"
                break
            case 7:
                columnName = "Column7"
                break
        endswitch
        String columnInfoForThisColumn = "N='" + columnName + "';"  // e.g., "N='_skip_';" or "N='Column3';"
        columnInfoStr += columnInfoForThisColumn   
    endfor
   
    return columnInfoStr
End

Function Demo()
    Variable numColumns = 10
    String columnInfoStr = GetColumnInfoStr(numColumns)
    Print columnInfoStr
    // LoadWave /B=columnInfoStr <other flags> ...
End
To try it, execute Demo() from the command line.