T O P I C R E V I E W |
smigs |
Posted - 03/30/2005 : 5:15:50 PM Origin Version (Select Help-->About Origin): 7SR2 Operating System: Windows XP
Hello all, I have a file with multiple (125) worksheets and I would like to take column 7 from each worksheet and add it to a new worksheet. Is there and easy way to do this?
Thanks, Ed |
2 L A T E S T R E P L I E S (Newest First) |
nixel |
Posted - 11/08/2016 : 3:34:12 PM Hello,
I have a similar task, except that it concerns rows, but I don't know what I should change in the code: I need to copy 7th row from Sheet1 of range Book1-Book22 to a new workbook. To each appended row i want to add a cell (in a new column) that would contain first three letters of old workbook long name.
Thanks a lot for your help! |
Mike Buess |
Posted - 03/30/2005 : 11:19:15 PM Hi Ed,
I assume that you want to add all columns to the same worksheet. If that's the case then here's a simple LabTalk solution...
win -t D; // create target wks %W=%H; // save its name repeat wks.ncols {del col(1)}; // delete all columns ii=0; doc -e W { // loop through all worksheets but skip the target (current wks name is %H) if("%H"!="%W") { ii++; if(%W!wks.nrows<wks.nrows) set %W -er wks.nrows; // add more rows to target if necessary %W!wks.addCol(); // add col to target %W!wks.col$(ii).label$=%H; // label the col with current wks name %(%W,ii)=%(%H,7); // copy col 7 of current wks to new col }; }; %W!wks.labels(); // show column labels
Mike Buess Origin WebRing Member |
|
|