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
 Export columns in separate files .txt

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
Afrancisco Posted - 06/06/2018 : 04:33:55 AM
Origin Ver. and Service Release (Select Help-->About Origin): OriginPro2018 SR1
Operating System: Windows 10

Hi!
I have some workbooks, with sheets full of columns, like 100 column in each sheet. The X is shared among all of them so I have that as the first column, and then all the other columns are data from spectrometry measurements.

I had it in separate .txt files when I imported them, then I modified them to match my needs, and now I need to export all of them into separate .txt again

The txt should be the first column the X, and then another of the Y columns, so if I have 100 Y columns, I should produce 100 .txt, one for each column. I do it manually, one by one, but this takes ages, do you know how could I make this automatic?

Thank you,

Adrian
1   L A T E S T    R E P L I E S    (Newest First)
JacquelineHe Posted - 06/06/2018 : 05:50:37 AM
Hi,

In dialog, Origin does not support to export these texts automatically in the dialog.
I suggest you can use loop Labtalk script to export them.

1. Active the worksheet.

2.Copy the following script into Script Window (menu: Windows:Script Window)

for (ii=1; ii<=100; ii++)
{
wselcol mode:=skip sel:=1 skip:=ii-1 end:=ii+1;
expASC type:=text path:="D:\$(ii)" select:=1;
}

3. Highlight the script, press "Enter" key.
Then 100 text files will be exported to D disk, and auto name from 1 to 100.
And you update the path of the export script to change the folder.


To know more detail about the Labtalk script, plesae refer to these help pages:
Loop: https://www.originlab.com/doc/LabTalk/ref/For-cmd
Select Columns: https://www.originlab.com/doc/X-Function/ref/wselcol
Export Worksheet to ASCII: https://www.originlab.com/doc/X-Function/ref/expASC

Thanks
Jacqueline
OriginLab

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