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 for Programming
 LabTalk Forum
 importing single *.DAT file into multiple workshee
 New Topic  Reply to Topic
 Printer Friendly
Author Previous Topic Topic Next Topic Lock Topic Edit Topic Delete Topic New Topic Reply to Topic

sasi245

Germany
9 Posts

Posted - 03/05/2002 :  08:34:50 AM  Show Profile  Edit Topic  Reply with Quote  View user's IP address  Delete Topic
Hi
I need to write a script file to import a *.DAT file which have n no of tables into excel worksheets using Origin. Each table should import into a different worksheet.That DAT file in notepad look like
table1:
0.222 0.324 0.3646 0.38746 . . .
0.233 0.0000 0.3333 0.00000033 . . .
. . . .
. . . .
. . . .
table 2
..
..
Table 3
.
.
I need to import each table into a seperate excel worksheet.
Can anyone help me in this regard?
Thank You....sasi

dafay

USA
1 Posts

Posted - 03/14/2002 :  2:53:43 PM  Show Profile  Edit Reply  Reply with Quote  View user's IP address  Delete Reply
Im not sure I understand your situation, but if I had to import data from a .DAT file (a Notepad file) into Excel worksheets I would use the VBA features native to Excel and would leave Origin script alone. Once the data is in Excel Id consider moving it to Origin for further processing.
Go to Top of Page

sasi245

Germany
9 Posts

Posted - 03/15/2002 :  06:31:39 AM  Show Profile  Edit Reply  Reply with Quote  View user's IP address  Delete Reply
Hi defay,
Thanks for the reply.My case is more or less similar to your case(which I read in Labtalk forum ).When ever a nonnumeric is found,the script should open a new wksand start importing from that point.ie: table1 should come in seperate wks and table 2 should come in other wks and so on.
It looks like

Table 1
Volt Freq[Hz] Prp[uC/cm2] Prn[uC/cm2]..
005 0.888800 -3.005 0.83918273
.. .. .. ..
.. .. .. ..
Table 2
(some text data
this also should come
in first column)
Volt Freq[Hz] Prp[uC/cm2] Prn[uC/cm2]..
0.213123 34 0.434355 0.232345
.. .. .. ..
.. .. .. ..
like that
Go to Top of Page

sasi245

Germany
9 Posts

Posted - 03/15/2002 :  06:38:07 AM  Show Profile  Edit Reply  Reply with Quote  View user's IP address  Delete Reply
I need to import Table1 in one wks and table 2 in seperate wks and so on.Since I am a new user to origin, i dont know much about Labtalk script.Thats why I am feeling little difficulty. Thanks ....Sasi
Go to Top of Page

Laurie

USA
404 Posts

Posted - 03/15/2002 :  11:33:08 AM  Show Profile  Edit Reply  Reply with Quote  View user's IP address  Delete Reply
I don't think that you need LabTalk in your case. Open a new worksheet and select File:Import ASCII Options and set the 'When non-numeric is found in numeric fields' field to 'Start new Worksheet/Column'.

OriginLab Technical Support
Go to Top of Page

vccer

Malaysia
4 Posts

Posted - 03/25/2005 :  01:37:36 AM  Show Profile  Edit Reply  Reply with Quote  View user's IP address  Delete Reply
I need the same import option, but there are negative '-' in my data, identified as non-numeric, thus breaking down the data set. Please help. Thanks.
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