I’ve got a large amount of data in Excel that I need to paste into a webform, hit the “send” button, wait for the page to reload, and continue where it left off.
My Excel data is 7 columns, roughly 500 rows.
I tried to follow a similar script by Craig Smith where another user us asking for similar help but I’m getting stuck. Here’s the post: https://macscripter.net/viewtopic.php?id=20318
I used Craigs script to put the data in to an array/list, but I’m not sure how to insert that data into the form.
set {master_data, dummy} to {{}, {}}
tell application "Microsoft Excel"
repeat with r_row from 2 to 3
repeat with c_col from 1 to 7
copy value of cell c_col of row r_row of active sheet to the end of dummy
end repeat
set end of master_data to dummy
set dummy to {}
end repeat
end tell
master_data
The webform has the following html boxes, if we’re using javascript their ID is the same as the Name
-foodColor
-foodSender
-foodReceiver
-foodValue
-foodAmount
-foodName
-foodShape
The Excel sheet I have contains those 7 items listed as data in the columns, so something like:
[format]
Color Sender Receiver Value Amount Name Shape
Red Bill Jim 100 40 Apples Round
Blue James Mike 400 10 Berries Oval
Green Pat Sam 130 5 Grapes Round
[/format]
I just need to paste each Excel column to its corresponding webform field, hit a “Send” button, and give it a minute to send, then move on to the next row of data.
I don’t know if there is a better way to do it other than an array, any help is much appreciated.