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
 Import-script- file name

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
neutrondude Posted - 09/13/2007 : 11:32:49 AM
Origin Version (Select Help-->About Origin): 75
Operating System: XP


Hi, Im trying to the following:
I have made an import script for data that do various operations on the data, including worksheet substractions, multiplications etc
I do this by defining a script in the import wizard.
The problem however, is that my file name is large, for example:

20070827_0_0276,
I want to use this name as the worksheet name- but this is too large.
Can I make origin change this to another one in the script, for example

kin276

I want to keep such a indexing as it is easier to keep track of a lot of data.

Thanks a lot for the help!



Edited by - neutrondude on 09/13/2007 11:42:00 AM

Edited by - neutrondude on 09/13/2007 12:47:09 PM

Edited by - neutrondude on 09/13/2007 12:48:09 PM
2   L A T E S T    R E P L I E S    (Newest First)
neutrondude Posted - 09/13/2007 : 1:43:57 PM
Dear Mike- it works perfectly

Thanks a lot!




Mike Buess Posted - 09/13/2007 : 12:52:03 PM
This works...

%A = page.info.system.import.filename$; // get filename
%A = %[%A,#1,.]; // strip extension
%A = %[%A,>%[%A]-2]; // strip all but last 3 characters
win -r %H kin%A; // rename worksheet

Note that you can also use the full filename as the worksheet label.

Mike Buess
Origin WebRing Member

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