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
 Exporting with Longname
 New Topic  Reply to Topic
 Printer Friendly
Author Previous Topic Topic Next Topic Lock Topic Edit Topic Delete Topic New Topic Reply to Topic

robicj

France
2 Posts

Posted - 04/24/2019 :  11:42:40 AM  Show Profile  Edit Topic  Reply with Quote  View user's IP address  Delete Topic
Origin Ver. and Service Release (Select Help-->About Origin):
Operating System:
Origin Ver. and Service Release (Select Help-->About Origin):
Operating System:
Hello All,
I am trying to export multiple worksheets with their longnames. I have tried several codes such as:

fdlog.openpath(B); // choose directory to store files

doc -e W{ // loop over all workbooks in project

doc -e LW // loop over all worksheets in workbook
{
string temp$ = wks.name$; // Get worksheet short name
// string temp$ = wks.longname$; // Run this line to get worksheet long name
expASC type:=text path:=%B%H_%(temp$) shortname:=1; // Export files as .txt files with column short names exported
};
}


But I am getting this error:

wks.longname$
string expression error!
TEMP:failed to add variable to local stack!


Has anyone add the same issue ?

Thank you!

Best regards,
Julie

Chris D

428 Posts

Posted - 04/25/2019 :  09:41:12 AM  Show Profile  Edit Reply  Reply with Quote  View user's IP address  Delete Reply
Hi,

With that exact script, I don't see the error. did you run it after you commented out this line?


// string temp$ = wks.longname$; // Run this line to get worksheet long name


If you still do, what version of Origin are you using?

Thanks,
Chris Drozdowski
Originlab Technical Support
Go to Top of Page

robicj

France
2 Posts

Posted - 04/29/2019 :  04:06:34 AM  Show Profile  Edit Reply  Reply with Quote  View user's IP address  Delete Reply
Hi Chris,

Thank you for your answer. I am using Origin Version 8.6001.

The worksheets are named following this template:
S01T001P1 (01)
S01T001P1 (02)
S01T001P1 (03)
S01T001P2 (01)
S01T001P2 (02)
S01T001P3 (03)
etc.

I have also tried to use the page.longname$ for the extraction and in this case I obtain the following error: Error: value (01) is missing a variable name. (same for 02 and 03).
My export line is as follow: expASC path:=%b%(temp1$); (temp1$ being the page.longname$)

Thank you.

Best regards,
Julie
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