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
 Importing specific sheets of excel

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
achu6393 Posted - 07/03/2017 : 12:22:54 PM
Dear all,

I am using impExcel X-Function for importing excel file through script. Is there an option that I can import only the 1st sheet of each excel file (5 excel sheets) that I am importing through LabTalk?

Origin Ver. and Service Release (Select Help-->About Origin): 9.3
Operating System: win 7

such coding! much wow!
4   L A T E S T    R E P L I E S    (Newest First)
yuki_wu Posted - 11/14/2017 : 05:26:49 AM
Hi achu6393 and who noticed this post,

We have improved the X-Function impExcel and impMSExcel. Now we are allowed to import the specified Excel sheets into Origin. Please refer to these examples below:
https://www.originlab.com/doc/X-Function/ref/impExcel#Examples
https://www.originlab.com/doc/X-Function/ref/impMSExcel#Example_3

Origin 2018 released last week. You can upgrade or download a demo to see how it works:
http://www.originlab.com/index.aspx?s=12&lm=62

Of course, we have many other improvements and new features in Origin 2018. You can visit
Originlab.com/2018 for more info.

Thanks,
Yuki
OriginLab
greg Posted - 07/30/2017 : 11:50:39 PM
Is this what you want:

dlgfile fname:=filenames group:="*.xls" multi:=1;
numfiles = filenames.getnumtokens();
loop(ii,1,numfiles)
{
fname$ = filenames.gettoken(ii,CRLF)$;
impExcel sheet:=1; // First sheet;
if(ii < numfiles) newsheet;
}
achu6393 Posted - 07/06/2017 : 07:09:05 AM
hello yuki,

That'd be great! Thank you.

such coding! much wow!
yuki_wu Posted - 07/03/2017 : 10:25:23 PM
Hi,

I am afraid that there is no way to import a specified sheet by LabTalk, even I find that there is an option in impExcel X-Function GUI. It is weird that Origin has not provided an open interface for this option. I will bring your case to our weekly share meeting and see what we can do to improve it.

For now, you might need to import all sheets and then delete the undesired sheets.

Regards,
Yuki
OriginLab

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