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
 Origin Forum
 csv import, set colums as X,Y

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
Milchy Posted - 06/19/2023 : 08:11:22 AM
Ver: Origin2023

Hello, I am importing .csv through the wizard, it has 100+ columns, certain LongNames should always be set as the X columns. I can do it manually in the preview window before finalizing the import.

Is there any automatic way to do this?

2   L A T E S T    R E P L I E S    (Newest First)
Milchy Posted - 06/26/2023 : 01:21:03 AM
Thanks! Works great!!!
YimingChen Posted - 06/19/2023 : 09:03:49 AM
You may need LabTalk script after import for such. On the last page of the import wizard, check the box Save Filter and Specify advanced filter options. Then click Next button. In the next page, enter the following script. Change ln to the longname of the columns to be set to x.

for (int i = 1; i < wks.ncols; i++) {
	if (wks.col$(i).lname$ == "ln") {
		wks.col$(i).type = 4;
	}
}




James


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