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
 Forum for Origin C
 worksheet naming requirement
 New Topic  Reply to Topic
 Printer Friendly
Author Previous Topic Topic Next Topic Lock Topic Edit Topic Delete Topic New Topic Reply to Topic

nicoc

Japan
Posts

Posted - 03/03/2005 :  11:40:17 AM  Show Profile  Edit Topic  Reply with Quote  View user's IP address  Delete Topic
Origin Version :7
Operating System: XP

The names of text files I import with the importASCII function have some "_" that disapear on the worksheet name. But then it is possible to rename the worksheet with "_". Is there any way to keep these "_" on the worksheet name during the importation of files.

Is there something in:
stAscImp = An ASCIMP struct that has been setup with import settings.

Thanks, nicolas

easwar

USA
1965 Posts

Posted - 03/03/2005 :  11:55:52 AM  Show Profile  Edit Reply  Reply with Quote  View user's IP address  Delete Reply
Hi nicolas,

Special characters such as "_" are currently not supported in worksheet, column etc names (although there was some intermediate build in which renaming with such special characters was possible, but that was a bug - such renaming can result in not being able to address the datasets properly in other areas, and so should be avoided).

You can assign the file name to the worksheet label as well - the label can contain special characters, and the label is displayed in Project Explorer etc.

Easwar
OriginLab


Edited by - easwar on 03/03/2005 11:56:51 AM
Go to Top of Page

nicoc

Japan
Posts

Posted - 03/05/2005 :  08:48:22 AM  Show Profile  Edit Reply  Reply with Quote  View user's IP address  Delete Reply
Thanks,
I just wonder how to get the label after, for example to use the worksheet label for the graph also.
It seems that GetLabel is only for columns.
Is there a function in OriginC like GetName.

nicolas
Go to Top of Page

easwar

USA
1965 Posts

Posted - 03/05/2005 :  09:36:33 AM  Show Profile  Edit Reply  Reply with Quote  View user's IP address  Delete Reply
Hi nicolas,

You can use code such as below:

Easwar
OriginLab



void page_label()
{
WorksheetPage wpg = Project.Pages();
string strLabel;
strLabel = wpg.Label;
printf("Page label currently is: %s\n", strLabel);
wpg.Label = "New Label";
wpg.TitleShow = WIN_TITLE_SHOW_BOTH;
printf("New label is: %s\n", wpg.Label);
}



Go to Top of Page

billaravi

USA
14 Posts

Posted - 05/18/2005 :  6:01:28 PM  Show Profile  Edit Reply  Reply with Quote  View user's IP address  Delete Reply
Running this code gives the following error

:Error, Variable "WIN_TITLE_SHOW_BOTH" not declared
Go to Top of Page

easwar

USA
1965 Posts

Posted - 05/19/2005 :  4:50:43 PM  Show Profile  Edit Reply  Reply with Quote  View user's IP address  Delete Reply
quote:

Running this code gives the following error

:Error, Variable "WIN_TITLE_SHOW_BOTH" not declared



My mistake...the TitleShow property was not available in v7.0 and was added in 7.5.

You could instead use LabTalk to set the title show property as below:


void page_label()
{
WorksheetPage wpg = Project.Pages();
string strLabel;
strLabel = wpg.Label;
printf("Page label currently is: %s\n", strLabel);
wpg.Label = "New Label";
LT_execute("page.title = 3;");
printf("New label is: %s\n", wpg.Label);
}



Easwar
OriginLab


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