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
 open multiple Excel Files

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
superklee Posted - 12/07/2004 : 03:47:09 AM
Origin Version (Select Help-->About Origin): 6.1
Operating System: Windows 2000

Hi everybody,

I´m trying to open a selection of multiple Excel files in Origin via labtalk.
First i´v been trying to open them as origin worksheets

getfilename -m *.*; // prompt for multiple files
system.Excel.OpenAsExcel=0; // open as origin worksheet
system.Excel.OpenAsPrompt=0; // no prompt
menge = count;
loop (ii, 1, menge)
{getfile -g ii;
doc -a %A;};

This works fine in the first loop but origin shuts itself down during the second loop.
I also tried this

run.section(file, Init);
fdlog.usegroup(EXCEL);
fdlog.multiopen();
system.Excel.OpenAsExcel=0;
system.Excel.OpenAsPrompt=0;
loop (ii, 1, fdlog.multiopen.count)
{fdlog.get(A, ii);
doc -append %A;}

after reading in this forum, but I think it's pretty much the same thing and Origin also closes itself in the second loop.
When I open the excel files as Excel Workbooks, everything works fine, but then i don't know how to determine the number of sheets within each workbook.

Did i forget a command to kind of like reset everything, since it worked in the first loop. Or can the doc -a command not be executed twice after another? Is there maybe another way to work around it?

Thanks

Anita
1   L A T E S T    R E P L I E S    (Newest First)
superklee Posted - 12/09/2004 : 09:05:28 AM
Nevermind,

I figured it out. I forgot to reassign some variables. at least it works now.

Greetz
Anita

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