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
 All Forums
 Origin Forum for Programming
 LabTalk Forum
 Exporting with Longname

Note: You must be registered in order to post a reply.
To register, click here. Registration is FREE!

Screensize:
UserName:
Password:
Anti-Spam Code:
Format Mode:
Format: BoldItalicizedUnderlineStrikethrough Align LeftCenteredAlign Right Horizontal Rule Insert HyperlinkUpload FileInsert Image Insert CodeInsert QuoteInsert List
   
Message:

* HTML is OFF
* Forum Code is ON
Smilies
Smile [:)] Big Smile [:D] Cool [8D] Blush [:I]
Tongue [:P] Evil [):] Wink [;)] Clown [:o)]
Black Eye [B)] Eight Ball [8] Frown [:(] Shy [8)]
Shocked [:0] Angry [:(!] Dead [xx(] Sleepy [|)]
Kisses [:X] Approve [^] Disapprove [V] Question [?]

 
Check here to subscribe to this topic.
   

T O P I C    R E V I E W
robicj Posted - 04/24/2019 : 11:42:40 AM
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
2   L A T E S T    R E P L I E S    (Newest First)
robicj Posted - 04/29/2019 : 04:06:34 AM
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
Chris D Posted - 04/25/2019 : 09:41:12 AM
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

The Origin Forum © 2020 Originlab Corporation Go To Top Of Page
Snitz Forums 2000