The Origin Forum
File Exchange
Try Origin for Free
The Origin Forum
Home | Profile | Register | Active Topics | Members | Search | FAQ | Send File to Tech support
Username:
Password:
Save Password
Forgot your Password? | Admin Options

 All Forums
 Origin Forum
 Origin Forum
 Automatic header detection
 New Topic  Reply to Topic
 Printer Friendly
Author Previous Topic Topic Next Topic Lock Topic Edit Topic Delete Topic New Topic Reply to Topic

originbob

3 Posts

Posted - 05/05/2014 :  07:54:40 AM  Show Profile  Edit Topic  Reply with Quote  View user's IP address  Delete Topic
Hello everyone,

the files I have to import into Origin (version 9.1) have a long header which is separated from the useful data by a blank line. Is there any way to tell Origin to simply ignore this header whenever I drag and drop a textfile into Origin? (I know several other ways to get my data into Origin, but a drag and drop solution would be very convinient.)

Cheers,
bob

lkb0221

China
497 Posts

Posted - 05/05/2014 :  10:01:12 AM  Show Profile  Edit Reply  Reply with Quote  View user's IP address  Delete Reply
Hi,

If all the data files you got have the same name pattern, you can build a import filter to support those particular files.
http://www.originlab.com/doc/Origin-Help/Imp-DragDrop-Basics#Origin_Import_Filters

When drag&drop to import a file, the corresponding filter will be used automatically. You can manage your filters in Tools: Import Filters Manager.

Zheng
OriginLab
Go to Top of Page

originbob

3 Posts

Posted - 05/05/2014 :  10:25:00 AM  Show Profile  Edit Reply  Reply with Quote  View user's IP address  Delete Reply
Hi Zheng,

thank you for your answer. In the dialouge you linked me to, I do not see an option to set a blank line as the dividing element between header and data. I would like to have Origin automatically determine the header (as it may vary in length) and then ignore it.

Maybe I am just missing something obvious here.

Thanks for your help.
Go to Top of Page

lkb0221

China
497 Posts

Posted - 05/05/2014 :  1:12:20 PM  Show Profile  Edit Reply  Reply with Quote  View user's IP address  Delete Reply
Hi,

I mean, in Import Wizard, you can specify the number of header lines and how to extract the column labels. So if all of your data files share the same pattern and can be recognized/handled by this setting, you can save it as an import filter for later use.

Please see the following page for how to use Import Wizard.
http://www.originlab.com/doc/Origin-Help/ImpWiz

Zheng
OriginLab
Go to Top of Page

originbob

3 Posts

Posted - 05/06/2014 :  03:16:17 AM  Show Profile  Edit Reply  Reply with Quote  View user's IP address  Delete Reply
Hi,

unfortunally, the header varies in length, so I cannot use a fixed number of header lines. Also, I do not mind if the column labels cannot be extracted.

Is there a way to have Origin automatically determine the length of the header?

Regards,
bob
Go to Top of Page

lkb0221

China
497 Posts

Posted - 05/07/2014 :  09:19:10 AM  Show Profile  Edit Reply  Reply with Quote  View user's IP address  Delete Reply
Hi,

Maybe you can send us (tech@originlab.com) some sample files so we can play with them to see what we can do. Might need a script since the header size is changing...

Zheng
OriginLab
Go to Top of Page

LC_

42 Posts

Posted - 06/18/2014 :  10:01:03 AM  Show Profile  Edit Reply  Reply with Quote  View user's IP address  Delete Reply
Hi

I have a similar problem. I have some files with variable header lengths, and the last header row is identified by a token (basically a few dashes).

In order to be able to finally import the file with impasc, I need to first be able to identify the row number that contains the token in order to set the header and subheader options from Options.Hdr.

But how can I possibly scan the file before opening them? I could not think of a good workaround so far.

thanks in advance
Go to Top of Page

lkb0221

China
497 Posts

Posted - 06/18/2014 :  10:12:53 AM  Show Profile  Edit Reply  Reply with Quote  View user's IP address  Delete Reply
Hi,

For those files that the length of header line changes among different files, I'll suggest first import all infos into worksheet and then using script to scan and find the header lines.

But if you don't care the header lines and ok to throw them away, you can just use the "Auto determine header lines" in Import Wizard.

Zheng
OriginLab

Edited by - lkb0221 on 06/18/2014 10:45:20 AM
Go to Top of Page
  Previous Topic Topic Next Topic Lock Topic Edit Topic Delete Topic New Topic Reply to Topic
 New Topic  Reply to Topic
 Printer Friendly
Jump To:
The Origin Forum © 2020 Originlab Corporation Go To Top Of Page
Snitz Forums 2000