I'm trying to build a macro to paste copied text of city, state and zip code data for companies I'm looking up on Google for my job. On occasion, Excel does this automatically because the webpage where the data was copied from was built as a table.
I'm trying to create a macro to paste what's on my clipboard but divide it properly into 3 columns. I feel like this would have been done already, does anyone know how to build this quickly or have something close to it?
I've figured out that it does what I need by pasting it into three different columns if I just use the plain text paste via ^โV.
The data I need is simply coping the City, state and zip code of about 220 companies and paste them into an Excel file. I thought I needed automation because at first Excel was pasting all the data into one cell so I was using the Text To Columns feature which would need to be automated.
@ccstone I've actually started writing the AppleScript for using the Text To Columns feature but I can't finish it cause I'm not that good with AppleScript yet. The script is below:
tell application "Microsoft Excel"
activate
end tell
tell application "System Events" to key code 9 using {control down, command down}
delay 3
tell application "System Events"
tell process "Microsoft Excel"
click menu item "Text To Columns..." of menu "Data" of menu bar 1
tell application "System Events" to key code 48
tell application "System Events" to key code 49
tell application "System Events" to key code 36
end tell
end tell
My AppleScript is stuck on:
Can you tell me how to select radio buttons, checkboxes and click the buttons with AppleScript?
That's not AppleScript per se that AppleScript UI-Scripting, and you might as well use Keyboard Maestro if you going to work the UI (unless there are objects KM cannot see but System Events can).
Post examples of what your clipboard data looks like, or provide a link to the source.
That is if you want help actually AppleScripting Excel.