maybe you can help me with a hint or workaround but I've been searching the whole morning for a solution and found nothing.
I have a folder with some worksheets:
ab001.wks ab002.wks ab003.wks
Now I would like to run a script that takes the existing worksheets, one after each other, creates a new worksheet and transfer some numbers from one to the other, so that it looks as follows
ab001.wks ab001_1.wks //line 1 to 20 of ab001.wks ab001_2.wks //line 61 to 80 of ab001.wks ab002.wks ab002_1.wks //line 1 to 20 of ab002.wks ab002_2.wks //line 61 to 80 of ab002.wks ab003.wks ab003_1.wks //line 1 to 20 of ab003.wks ab003_2.wks //line 61 to 80 of ab003.wks
I've tried it with the "doc -ef w {script}" command, but it seems to cause a crash, because Origin seems to try to run the script also on the new created Worksheets, so that you get an endless loop.
Is there some way to include or exclude worksheets who end/begin with some signs, or create a subfolder, transfer some files so that they are seperated or something like that?
Thanks in advance
Thomas
1 L A T E S T R E P L I E S (Newest First)
Mike Buess
Posted - 02/24/2006 : 08:11:33 AM Hi Thomas,
Probably easiest to create a new folder for the output worksheets. The necessary LabTalk commands are in the Extended LabTalk Commands section of the programming guide.
...Another possibility is to use doc -ef to create a list of current wks names and then operate on that list.
%Z=""; doc -ef W {%Z=%Z %H}; for(ii=1; ii>0; ii++) { %W=%[%Z,#ii]; // name of wks #ii if(%W=="") break; // quit if no more names win -a %W; // activate wks // do something };