Looking for a good sample of an apple script that copies a range of cell and writes it to another in different, within the same document work book
I have a working script that copies a range of a column to another column within the same table, now I would like to copy to another table in a different sheet. Basically read from sheet1 table1 and write to sheet 2 table two.
*if by chance, I would like it to omit the blanks within the range.
here is the original working script, please feel free to modify or change it entirely to something better
as long as it able to to do the task, I am open to ideas or solutions.
here is the generic script
set tblName to "Table 1"
set srceRng to "H2:H16"
set destRng to "A2:A16"
tell application "Numbers"
tell document 1 to tell active sheet
tell table tblName
set destCol to range destRng's column 1's address
repeat with c in range srceRng's cells
set v to c's value
set r to c's row's address
set row r's cell destCol's value to v
end repeat
end tell
end tell
end tell
- Copy a range in table 1 sheet 1 to sheet 2 with same workbook/doc
- while eliminating blanks
- create sheet 2 with same dimensions if sheet 2 doesn't exist (extra not necessary) I will be happy with the first two
THANKS
MacBook Air, macOS 14.0