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
 Batch Scripting Export

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
BryanK Posted - 11/28/2014 : 08:32:33 AM
V.9.0 windows 7

Hello,
I have written the following simple script for batch import.
%A = wks.name$;
%B = _treated;

wo -s;
wks.colsel(13,1);
wks.colsel(14,1);
wks.export.cntrl = 8;       // Just export selected data - no headers
wks.export.separator$ = "\t";
save -wh %H %A%B.dat;
wo -s; //Remove selections

It works fine in the script window and it works as expected for the final file if placed in the "Script at the end" box of Batch Processing.

Unfortunately, in the intended "Script after each process" box, files are exported empty (1 kb). Is it something that I have missed or is this a bug?

The idea is to export, en-mass, the final two columns of each -new- workbook with the name wks.name$_treated. Thus, ignoring empty books and books that were batch processed earlier.

Does anybody have any ideas?
Thanks,
Bryan
2   L A T E S T    R E P L I E S    (Newest First)
BryanK Posted - 12/05/2014 : 06:10:11 AM
Wow. Thanks Zheng. That was incredibly easy! I made a quick change to my code which works perfectly in the batch window for each file:
fdlog.openpath(P); // choose directory;
%A = wks.name$;
%B = _treated;

wo -s;
wks.colsel(13,1);
wks.colsel(14,1);
expASC type:=1 path:=%P%A%B select:=1 separator:=1 longname:=0 units:=0 comment:=0;
wo -s;
lkb0221 Posted - 12/03/2014 : 5:44:08 PM
Hi,

Please try using expASC X-Function to do the export:
http://www.originlab.com/doc/X-Function/ref/expASC

Zheng
OriginLab

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