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
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.
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
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
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'.