T O P I C R E V I E W |
thentangler |
Posted - 08/15/2010 : 12:09:21 PM Origin Ver. 8.1 and Service Release 3 Operating System: Win 7
Hi, I need help on accessing worksheets in my scripts. For example, I have about 50 worksheets in my workbook (Book1) which are named from d1 to d50. And i want to pick out the value in cell(1,30) out from each of the worksheets and put them in a new worksheet so that I will have a column with 50 values in the new worksheet. How do I do this in Labtalk. What are the syntaxes for accessing and manipulating worksheets in a workbook? I tried searching for it in the help file, but was not very successful. Id really appreciate any help. thanks
|
3 L A T E S T R E P L I E S (Newest First) |
AmandaLu |
Posted - 08/17/2010 : 03:16:33 AM quote:
So which is the line which tells it to write to "newsheet"?
range bb=51!1; //this line define the range bb as the first column in the 51th sheet, which is the new worksheet bb[$(ii)]=aa[1]; //this line tells it to copy the value in cell(1,30) in the iith sheet to the new worksheet
quote:
is $(ii)! taking the (1,30) value from the iith sheet?
Yes. In this line: range aa=$(ii)!30; we define range aa as the 30th column in the iith sheet.
|
thentangler |
Posted - 08/16/2010 : 11:47:07 PM Hi Amanda, Thank you so much for the reply. So which is the line which tells it to write to "newsheet"? is $(ii)! taking the (1,30) value from the iith sheet?
|
AmandaLu |
Posted - 08/16/2010 : 02:46:40 AM Dear thentangler,
You can define a Range to accessing worksheets. For example, if you want to copy the values in cell(1,30) of every worksheet to a new sheet in Book1, please activate Book1 and run the following scripts:
newsheet; for(ii=1;ii<=50;ii++) { range aa=$(ii)!30; range bb=51!1; bb[$(ii)]=aa[1]; }
For more information about Range, please refer to here. |
|
|