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
 Workbook names in Origin 8
 New Topic  Reply to Topic
 Printer Friendly
Author Previous Topic Topic Next Topic Lock Topic Edit Topic Delete Topic New Topic Reply to Topic

rezapaz

Germany
Posts

Posted - 04/01/2008 :  05:48:37 AM  Show Profile  Edit Topic  Reply with Quote  View user's IP address  Delete Topic
Origin Version: 8
Operating System: Vista

Hi,

we are now using origin 8 and when I open an older file which was created with Origin 7.5, then the workbooks all have an extremely long name which is actually the path of the original imported file. How can I prevent this?

Thanks in advance,

Reza

Echo_Chu

China
Posts

Posted - 04/02/2008 :  01:45:38 AM  Show Profile  Edit Reply  Reply with Quote  View user's IP address  Delete Reply
Hi, Reza

Does the older file you said is a OPJ file created in Origin7.5? If so, I am afraid that I can not reproduce the problem. Would you mind to send your file to tech@originlab.com and let's look into it.

Echo
OriginLab Corp
Go to Top of Page

redman

UK
59 Posts

Posted - 04/04/2008 :  09:09:08 AM  Show Profile  Edit Reply  Reply with Quote  View user's IP address  Delete Reply
Yes, it's true.

The paths of your worksheets in origin 7.5 will become the Long Names of workbooks in Origin 8.

I'm afraid you have to rename all the workbooks with a script , for example:

doc -e W
{
Page.label$=%H;
}

The above script will rename Long name as the same as the short name of each workbook. However, I don't know yet how to set the full path, where each worksheet was originally imported, as the Commont of the workbook (in Origin 8).


Go to Top of Page

rezapaz

Germany
Posts

Posted - 04/05/2008 :  05:59:03 AM  Show Profile  Edit Reply  Reply with Quote  View user's IP address  Delete Reply
Thanks for your help.
I will try the script, although I am not very familiar with it :-) But it is time to learn!

Go to Top of Page

rezapaz

Germany
Posts

Posted - 04/05/2008 :  12:24:58 PM  Show Profile  Edit Reply  Reply with Quote  View user's IP address  Delete Reply
sorry bothering ... but how do I make this script run?
I tried several things but I did not succeed

thanks again
Go to Top of Page

redman

UK
59 Posts

Posted - 04/05/2008 :  6:20:31 PM  Show Profile  Edit Reply  Reply with Quote  View user's IP address  Delete Reply
1. Open the [script window] first from the [window] menu.
2. Copy the above script to the script window.
3. Select all lines of the script by mouse, then press ENTER key on keyboard.

Go to Top of Page

rezapaz

Germany
Posts

Posted - 04/07/2008 :  05:21:30 AM  Show Profile  Edit Reply  Reply with Quote  View user's IP address  Delete Reply
Thanks for your help.
Actually this was what I did, but it does not work :-(
Go to Top of Page

easwar

USA
1964 Posts

Posted - 04/07/2008 :  3:44:02 PM  Show Profile  Edit Reply  Reply with Quote  View user's IP address  Delete Reply
Hi,

In 7.5 when a file is imported, the file path gets put into label property of the worksheet. In 8.0 we mapped the 1st line of the label property to the new Long Name property, and the rest of the lines to Comments property for the page.

Thus when you open the 7.5 opj, what used to be 1st line of label, which contains the long string with path, becomes the workbook long name.

In Project Explorer, Long Name is shown by default if it is not empty. So that is why PE also shows this long path string. In PE, if you right click, you have the option to show Short Name and Long Name separately.

Now, you can take this long name string and push it into comments using this script:

doc -e W
{
%a=page.label$;
page.label$=%h;
page.comments$=%a;
}



The second line above is optional - that just sets the long name same as short name, you could leave that out for instance.

rezapaz, did you copy the script "as is" and paste into script window and select ALL lines and press enter? If you enter one line at a time and press Enter it will add ; to lines that can break the script...

Easwar
OriginLab

Go to Top of Page

easwar

USA
1964 Posts

Posted - 04/07/2008 :  3:59:47 PM  Show Profile  Edit Reply  Reply with Quote  View user's IP address  Delete Reply
Hi,

Thanks again for bringing up this issue.
We will look into adding an option so when old OPJ is opened, and label appears to contain file path, we can bring up a dialog asking if these should be pushed to comments, and user can answer yes and set it to work this way for future opjs.

Easwar
OriginLab

Go to Top of Page

rezapaz

Germany
Posts

Posted - 04/08/2008 :  04:16:12 AM  Show Profile  Edit Reply  Reply with Quote  View user's IP address  Delete Reply
Hi everybody,

thanks for your help. This time it worked.
Although it also removed additional characters like "_" but it is now much better!

Some dialogue where the user is asked would be really good. I was so surprised to see the very long names...

Best reagards,

Reza
Go to Top of Page

SeanT4x4

USA
1 Posts

Posted - 12/18/2013 :  3:29:41 PM  Show Profile  Edit Reply  Reply with Quote  View user's IP address  Delete Reply
I am looking for something that does the exact opposite. I need something that renames the short name to what the long name is assigned.
Go to Top of Page

greg

USA
1378 Posts

Posted - 12/30/2013 :  09:15:41 AM  Show Profile  Edit Reply  Reply with Quote  View user's IP address  Delete Reply
Making Short Names (whether Page or Column names) follow Long Names is problematic. Short Names are in fact considered variables in Origin and as such have restrictions on length and characters that Long Names do not.

Consider the case where you want to name a page or column "Test #25":

wks.col3.name$ = "Test #25"; // Rename the third column Short Name
win -r %H "Test #25"; // Rename the page Short Name

In both cases, Origin would automatically fix the 'problem' name and the result would be:

Test25
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