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 multiple txt files from a single worksheet

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
Ortiiiiiz Posted - 09/24/2013 : 4:01:07 PM
Origin Ver. and Service Release (Select Help-->About Origin): OriginPro 8 SR 0
Operating System: Windows 7

Hi,

I am trying to export multiple .txt files from a single worksheet. This worksheet contains 130 columns, and I would like to have 65 files containing 2 columns each. Could you help me?

Thank you!

Eduardo O.

Eduardo O.
2   L A T E S T    R E P L I E S    (Newest First)
rainbowkoala Posted - 09/26/2013 : 01:32:11 AM
This is cool. I just thought there was not a simple solution.
Hideo Fujii Posted - 09/25/2013 : 10:41:29 AM
Hi Eduardo,

You can try the following script:
/////////////////////////////////
src$=%H;
nc=wks.nCols;
win -t WKS;
dest$=%H;
dest$!wks.export.CNTRL=7;
for(ii=1; ii<=nc; ii=ii+2) {
  colcopy irng:=[src$]1!wcol(ii)   orng:=[dest$]1!col(1) lname:=1 units:=1 comments:=1;
  colcopy irng:=[src$]1!wcol(ii+1) orng:=[dest$]1!col(2) lname:=1 units:=1 comments:=1;
  save -wh %(dest$) %y%(src$)_$(ii).txt;
  type -a %y%(src$)_$(ii).txt saved;
}
win -cd %(dest$);
/////////////////////////////////
Hope this works as you wanted.

--Hideo Fujii
OriginLab

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