| T O P I C R E V I E W |
| gestalt |
Posted - 12/16/2003 : 4:07:08 PM Hello,
I hope this is not answered elsewhere in the forum. I have not had any luck finding examples concerning this. I am having trouble appending worksheets end to begining. For example:
Wrks1 1 1 1 1 1 1
Wrks2 2 2 2 2 2 2
Appending them, the worksheet should read
1 1 1 1 1 1 2 2 2 2 2 2
I have been using the following code, but it seems to behave erratically. The idea is to feed the function up to four worksheets which the function appends and the places in a newly names worksheet.
define cwksapp{
%v=%1; %q=%2; %r=%3; %s=%4; %t=%5;
worksheet -b %q; worksheet -d %v;
nrows1=%q!wks.maxRows; nrows2=%r!wks.maxRows; nrows3=%s!wks.maxRows;
//copy and append all to %v //%v is a copy of %q so data does not need duplicated
%r!wks.copy(w); %v!wks.paste(w,1,nrows1+1);
%s!wks.copy(w); %v!wks.paste(w,1,nrows1+nrows2+1);
%t!wks.copy(w); %v!wks.paste(w,1,nrows1+nrows2+nrows3+1);
}
I seem to have some problems. I am wondering if it might be the variable names are getting corrupted by other functions disrupting the variable names. If so, is there a way to declare local and global variables in Labtalk?
Thanks in advance for your help.
Jeff |
| 1 L A T E S T R E P L I E S (Newest First) |
| Mike Buess |
Posted - 12/16/2003 : 6:12:33 PM Hi Jeff,
I would try something much simpler...
# append Data2 to Data1 %A=Data1; %B=Data2; loop(i,1,%B!wks.ncols) { copy -a %(%B,i) %(%A,i); };
Hope that helps.
Mike Buess Origin WebRing Member |
|
|