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
 impExcel filename into a variable

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
coll@inia. Posted - 05/09/2011 : 11:53:13 AM
Origin Ver. 8prof wxp

I am importing one single file *.xls at a time by the impExcel command.

I need to get the name of the excel file into a variable for further automatic processing (.: copy, etc, etc).

I try different alternatives by using the fname$. Finally I am exhausted. I gave up.

Does anybody knows a way to get it?

Thanks, julio
2   L A T E S T    R E P L I E S    (Newest First)
coll@inia. Posted - 05/10/2011 : 03:21:26 AM
OK!!!
Thanks, now it looks easy,
bye now, julio
Penn Posted - 05/10/2011 : 01:16:47 AM
Hi julio,

By default, the impExcel X-Function will rename the workbook with the file name. So, you can get the file name from the workbook name. For example:

// file to import
fname$ = system.path.program$ + "Samples\Automation Server\Excel\Analysis Template.xls";
// import file
impExcel;
// get the workbook name
string strName$ = page.name$;
// output the string variable
strName$ = ;


Penn

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