| Author |
Topic  |
|
|
superklee
Germany
Posts |
Posted - 12/07/2004 : 03:47:09 AM
|
Origin Version (Select Help-->About Origin): 6.1 Operating System: Windows 2000
Hi everybody,
Im trying to open a selection of multiple Excel files in Origin via labtalk. First iv 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 |
|
|
superklee
Germany
Posts |
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 |
 |
|
| |
Topic  |
|
|
|