Author |
Topic  |
|
CaseyMel
USA
Posts |
Posted - 04/19/2006 : 4:50:20 PM
|
Origin Version (Select Help-->About Origin): 7.5 SR1 Operating System: Windows XP
I am new to Origin. Is there a way to import only certain columns in an ASCII file? My data file contained about 300 columns and I only need about 10 of the columns. Thanks in advance for your help. |
|
Mike
USA
357 Posts |
Posted - 04/19/2006 : 5:31:59 PM
|
Hi CaseyMel:
There are a number of ways you might go about this, depending upon your how complex your file structure is. If you are importing with the File:Import:Simple Single ASCII menu command, you will see that there is a Partial Import check box in the Import ASCII dialog box. If the columns you want are contiguous, this might work for you (this check box also appears on the Data Selection page of the Import Wizard (File:Import:Import Wizard).
Otherwise, you are looking at something that is a bit more complex -- again, just how much so will depend upon exactly what you need to do.
Mike OriginLab
|
 |
|
CaseyMel
USA
Posts |
Posted - 04/20/2006 : 2:30:44 PM
|
Mike,
The columns that I need are not contiguous. They are all scatter through out the data file. I would like to import only those colums and save it as a filter file (so I can use it with other data file that I need to import.)
I have a template that I have to use, that's why I need only those certain columns. |
 |
|
easwar
USA
1965 Posts |
Posted - 04/21/2006 : 3:43:07 PM
|
Hi CaseyMel,
Currently the only ways to acheive this are: 1> import all columns and delete the ones that you don't want 2> import all columns and create a new wks and copy the ones you want and delete the other worksheet 3> write custom import code that parses your file to read only the data you want.
Are you using the import wizard and the filter mechanism at this point? If so, for options 1>, 2> above, you could write script code in the edit box on the very last page of the wizard (the page after the save filter page - you need to check the "advanced options" check box.)
So for example, your filter could first import all 300 cols, then the script code in your filter could make a new wks from your custom template, then copy over the cols you want, and delete the wks into which all cols were imported.
Easwar OriginLab
Edited by - easwar on 04/21/2006 3:45:46 PM |
 |
|
easwar
USA
1965 Posts |
Posted - 04/21/2006 : 4:23:49 PM
|
Hi CaseyMel,
One other option could be to do this programmatically in a loop where each time partial import settings are used to import only one column of the data, and which column that is imported is changed in the loop - so the file gets imported multiple times, bringing in one column of data each time.
Easwar OriginLab
|
 |
|
|
Topic  |
|
|
|