4

I spend hours on end every week transferring information from an excel file into a webform. Right now I am copying and pasting each cell individually. What I would prefer to do is select a row in my excel file and have some sort of automation take the information in certain columns and paste them into a form in my web browser. I want this to be something I can repeat quickly and with as few keystrokes as possible.

I tried Automator on mac, but it did a terrible job, so I'm hoping there can be something better.

harrymc
  • 498,455
invot
  • 93

2 Answers2

0

Have you tried using mail merge?

  1. Load your web form (assuming you have an HTML version of the form) into MS word.
  2. The exact steps would differ depending on which version of Word you you are using.
  3. Load the Excel file as a data source.
  4. Insert the fields from your Excel file into your Word form.
  5. Now you would have all the data from the Excel file in HTML pages. These HTML pages can then be published and used where needed.

This is a high level explanation. If you need more detail send me an email and we can look at your requirements in more detail.

t0mppa
  • 205
0

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 :

  1. Select the Excel cells
  2. Copy them to the clipboard all at once
  3. 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.)
  4. 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.

harrymc
  • 498,455