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
Username:
Password:
Save Password
Forgot your Password? | Admin Options

 All Forums
 Origin Forum
 Origin Forum
 Import-script- file name
 New Topic  Reply to Topic
 Printer Friendly
Author Previous Topic Topic Next Topic Lock Topic Edit Topic Delete Topic New Topic Reply to Topic

neutrondude

Brunei
Posts

Posted - 09/13/2007 :  11:32:49 AM  Show Profile  Edit Topic  Reply with Quote  View user's IP address  Delete Topic
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

Mike Buess

USA
3037 Posts

Posted - 09/13/2007 :  12:52:03 PM  Show Profile  Edit Reply  Reply with Quote  View user's IP address  Delete Reply
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
Go to Top of Page

neutrondude

Brunei
Posts

Posted - 09/13/2007 :  1:43:57 PM  Show Profile  Edit Reply  Reply with Quote  View user's IP address  Delete Reply
Dear Mike- it works perfectly

Thanks a lot!




Go to Top of Page
  Previous Topic Topic Next Topic Lock Topic Edit Topic Delete Topic New Topic Reply to Topic
 New Topic  Reply to Topic
 Printer Friendly
Jump To:
The Origin Forum © 2020 Originlab Corporation Go To Top Of Page
Snitz Forums 2000