AppleScript get the value from cell range and set to variable
Dear All
I try get the value from each rows and each column with code below but found error.
set {begCol, endCol} to {2, 17}
set tgtCol to 1
tell application "Numbers"
tell front document
tell sheet "31Dec17"
tell table 1
set AmountVal to rows's (cellsbegValthru endCol)'s value
end tell
end tell
end tell
end tell
set Amount to AmountVal
tell application "Numbers"
activate
tell front sheet of front document
set myOriginalTable to front table
set setCols to 8
set myNewTable to makenewtablewith properties ¬
{row count:(count of AmountVal) + 1, column count:setCols, header column count:0}
set x to 2
repeat with eachAmount in Amount
set value of cell x of column "G" to eachAmount
set x to (x + 1)
end repeat
the error at below,
Thanks you
MacBook Pro (13-inch, 2017, 4 TBT3), macOS High Sierra (10.13.3)