Numbers AppleScript assistance needed for copying cell values
Hi All,
I am trying to copy values of cells of 3 rows, into another table that contains 8 rows.
I want to copy them into the first 3 rows, leaving the other rows undisturbed.
My script does the copying fine, but
- Should start row 2, column A, but starts in row 1, column F
- After pasting into column A,B,C, should go back to column A, and down 1 row, But continues to paste the data into row 4,5,6,7,8 and I cannot figure out how to force the script to go back to column A, after pasting the 3 cells.
- Also for some reason I cannot get the actual copying to take place using the sheet names, but only sheet numbers?
-- Adds new rows at the bottom
set antalrowws to row count of table "Mainstatements" of sheet "MainaccountPrep"
set startrows to row count of table "Transactions" of sheet "ProcessPrep"
repeat with r from 1 to antalrowws
add row below last row of table "Transactions" of sheet "ProcessPrep"
end repeat
--Selects all cells and copies them from Mainaccountprep into ProcessPrep
set srcRangeValues to value of cells of cell range of table "Mainstatements" of sheet 8
set destCellList to cells of cell range of table "Transactions" of sheet 7
repeat with i from 1 to length of destCellList
set value of item (i + startrows) of destCellList to item i of srcRangeValues
end repeat
Can anybody help me?
Alternatively if anybody has a script for simply copying the first 3 columns into another table, that would make it all so much simpler ;-)
Best...Jan