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
 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 : 3:36:59 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.
1   L A T E S T    R E P L I E S    (Newest First)
Penn Posted - 09/30/2013 : 05:34:35 AM
Hi Eduardo O.,

Please try this.

int nCols = wks.nCols;
int ii;
for(ii = 1; ii <= nCols; ii+=2)
{
	worksheet -s $(ii) -1 $(ii+1) -1;  // select two columns
	expasc type:=text path:="d:\data$(ii).txt" select:=1;  // export two selected columns
}


Penn

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