I have a simple script written that successfully saves the current date in the format I need. I also have saved a destination range in the active sheet. I just need syntax to paste/insert it into that range of cells.
tell application "Microsoft Excel"
get active workbook
tell sheet 1
set ReportDate to do shell script "date '+%d/%m/%Y'"
set range_value to value of used range
set firstUnusedCellA to (count range_value)
set DestinationRange to "G2:G" & (firstUnusedCellA)
get ReportDate
paste special on worksheet active sheet destination range DestinationRange
end tell
Best Answer
I think the code below speaks for itself. The do shell script command shouldn't be used inside another application tell block. Still I prefer a vanilla AppleScript solution as below which is fine to be used in any context in the script.