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
 impExcel filename into a variable
 New Topic  Reply to Topic
 Printer Friendly
Author Previous Topic Topic Next Topic Lock Topic Edit Topic Delete Topic New Topic Reply to Topic

coll@inia.

Spain
125 Posts

Posted - 05/09/2011 :  11:53:13 AM  Show Profile  Edit Topic  Reply with Quote  View user's IP address  Delete Topic
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

Penn

China
644 Posts

Posted - 05/10/2011 :  01:16:47 AM  Show Profile  Edit Reply  Reply with Quote  View user's IP address  Delete Reply
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
Go to Top of Page

coll@inia.

Spain
125 Posts

Posted - 05/10/2011 :  03:21:26 AM  Show Profile  Edit Reply  Reply with Quote  View user's IP address  Delete Reply
OK!!!
Thanks, now it looks easy,
bye now, julio
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