It should be possible to write an AppleScript script that transfers
a row from Excel to the browser.
Copying a row in Excel places on the clipboard the contents of the cells, separated by tabs.
The idea is for the script to copy these characters to the browser as keystrokes.
All you need to do is then :
- Select the Excel cells
- Copy them to the clipboard all at once
- Click in the first field in the browser where the copied data needs to go.
(I assume here that the fields in the browser page are in the same order as the Excel cells.)
- Use the script to read the clipboard and then send the copied characters
as separate keystrokes to the browser, one by one.
This will transfer the characters from the clipboard one-by-one to their fields.
The Tab character will act like the Tab key to move the cursor from the current browser
field to the following one.
I cannot write and test such a script because I don't have a Mac, but here are some useful
articles that contain the necessary information :
Copy pure text from clipboard using AppleScript
set theData to (the clipboard as text)
Looping Through a String As If It Were a List
set my_string to (the clipboard as text)
repeat with counter_variable_name from 1 to count of my_string
set current_character to item counter_variable_name of my_string
end repeat
Automate a key press in AppleScript
tell application "<browser-appl-name-here>" to keystroke current_character using command down
You could even use this same mechanism to send first the sequence Cmnd+C
to Excel, so all you will need to do is select the cells in the spreadsheet and the script
will also do the copy to the clipboard.
For more info, see
Introduction to AppleScript Language Guide.
Once the script is written and tested, you could bind it to a hotkey by using one of the many
available methods.