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 for Programming
 LabTalk Forum
 renaming worksheets
 New Topic  Reply to Topic
 Printer Friendly
Author Previous Topic Topic Next Topic Lock Topic Edit Topic Delete Topic New Topic Reply to Topic

tndt98

UK
1 Posts

Posted - 07/15/2004 :  11:13:43 AM  Show Profile  Edit Topic  Reply with Quote  View user's IP address  Delete Topic
hi
i'm writing a little script to import lots of similar data into a prebuilt template, and want to rename each wks with the device name.
only when I use
open -w %A;
it renames the wks with %A.
unfortuantely only the last 4 chars (before extension) are different in these filenames (convention) and so it prompts me to rename all the sheets manually when I import multiple ASCIIs

getfile *.div;
// separates out the name I want
namelength=%[%A];
%M = %[%A,namelength-8:namelength-4];
type %M;

window -t wks f:\tndt98\templates\div.otw [%M];
open -w %A;


The problem occurs in the last line of the script - the template I open gets renamed with the first 10 chars of %A, which are identical for all files!!

Can anyone suggest a fix? or differnet renaming strategy
eternal thanks!
tom

Mike Buess

USA
3037 Posts

Posted - 07/15/2004 :  11:35:38 AM  Show Profile  Edit Reply  Reply with Quote  View user's IP address  Delete Reply
You can turn off the option to rename the worksheet at import.

Import->ASCII Options->Other Options
1. Uncheck "Rename worksheet to data file name" and click OK.
2. Click Update Options and close ASCII Options with Cancel.
3. Right-click on title bar and select Save Template.

Mike Buess
Origin WebRing Member
Go to Top of Page

Charles.A.1

USA
9 Posts

Posted - 12/06/2004 :  03:10:07 AM  Show Profile  Edit Reply  Reply with Quote  View user's IP address  Delete Reply
What's the most efficient way to (re)name the imported files (using for instance Origin Pro 7.0)?

In my case I have many files of the form xxxxyyyzz_tttt.txt where xxxx could be 2004, yyy could be DEC, zz could be 31, and tttt could be 2359.

I can add the win -r to the script, but is there a worksheet name length limitation and restriction?

So far I have only been able to batch worksheets with names of the form Axxxxyyyzzttt. In this case I run into common names--not good.

Please suggest a reasonable solution (besides a possible upgrade). Thanks in advance!
Go to Top of Page

Charles.A.1

USA
9 Posts

Posted - 12/10/2004 :  01:17:04 AM  Show Profile  Edit Reply  Reply with Quote  View user's IP address  Delete Reply
Apparently the answer is:
*worksheet names are limited to basic characters up to 13 in length
*object (worksheet name + column name combined) length is up to 25 characters
Unfortunate limitations....
Please correct me if I'm wrong.

Go to Top of Page

hajo

Germany
Posts

Posted - 12/10/2004 :  06:22:13 AM  Show Profile  Edit Reply  Reply with Quote  View user's IP address  Delete Reply
Hello, all

I use the label feature for individual descriptive worksheet labels. Origin handles the data file names (worksheet page names) by itselves by giving names like "data1, data2 ..."

The label isn't limited the way, the name is and accepts special characters like "-_:,; ...".

So far
Hajo

--
Dipl.-Ing. Hans-Joerg Koch
SiemensVDO Automotive,
Regensburg, Germany
Go to Top of Page

greg

USA
1380 Posts

Posted - 12/16/2004 :  12:22:38 PM  Show Profile  Edit Reply  Reply with Quote  View user's IP address  Delete Reply
To follow up on what Hajo said...

page.label$ = %N; // Set page Label to any string value
page.title = 1; // Show Label ONLY. Value of 3 shows Name - Label


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