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
 All Forums
 Origin Forum for Programming
 LabTalk Forum
 Import single file with multiple XY

Note: You must be registered in order to post a reply.
To register, click here. Registration is FREE!

Screensize:
UserName:
Password:
Anti-Spam Code:
Format Mode:
Format: BoldItalicizedUnderlineStrikethrough Align LeftCenteredAlign Right Horizontal Rule Insert HyperlinkUpload FileInsert Image Insert CodeInsert QuoteInsert List
   
Message:

* HTML is OFF
* Forum Code is ON
Smilies
Smile [:)] Big Smile [:D] Cool [8D] Blush [:I]
Tongue [:P] Evil [):] Wink [;)] Clown [:o)]
Black Eye [B)] Eight Ball [8] Frown [:(] Shy [8)]
Shocked [:0] Angry [:(!] Dead [xx(] Sleepy [|)]
Kisses [:X] Approve [^] Disapprove [V] Question [?]

 
Check here to subscribe to this topic.
   

T O P I C    R E V I E W
Greg78 Posted - 07/10/2018 : 05:08:19 AM
Origin Ver.9
Operating System: Windows 10

Hello,

Can someone help me, please?
I have a file with 2 columns with multiple XY.
Each XY is separated by en empty line.
Example :

21 43
22 47
23 12

21 56
22 11
23 89

21 68
22 98
23 01

Is it possible to import this file creating a workbook with 2*N columns if N is the number of XY data set in my file (N=3 in the example)?

Thank you for your help.
1   L A T E S T    R E P L I E S    (Newest First)
Hideo Fujii Posted - 07/10/2018 : 10:24:41 AM
Hi Greg78,

The following x-function works in the latest Origin 2018b:

impASC fname:=C:\Temp\mydata.dat options.FirstMode:=3 options.headers.AutoSubHeaderLines:=0 options.Cols.ColDesignations:=(XY) options.Miscs.NonNum:=3;
See the details of the options at: https://www.originlab.com/doc/X-Function/ref/Details-of-TreeNodes-in-Import-ASCII
I just got these options by pressing "Generate Script" shortcut menu from the manually opened impASC dialog.

I cannot test Origin 9.0, but at least I could try Origin 9.1. It seems that the notation of the option settings
was quite revised later, and fewer options are available than in ver. 2018b such as options.Cols.ColDesignations
for the column designations. The following x-function worked in my Origin 9.1:
impASC fname:=C:\Temp\mydata.dat options.ImpMode:=3 options.Hdr.AutoSubHdr:=0 options.Miscellaneous.NonNum:=3;
In either case, every column after the first XY pair gets an empty row added at the top, and you need to take care of it.

Hope this helps.

--Hideo Fujii
OriginLab

The Origin Forum © 2020 Originlab Corporation Go To Top Of Page
Snitz Forums 2000