Skip to content

Instantly share code, notes, and snippets.

@arkadyan
Created July 5, 2013 18:38
Show Gist options
  • Save arkadyan/5936406 to your computer and use it in GitHub Desktop.
Save arkadyan/5936406 to your computer and use it in GitHub Desktop.
Paste CSV data into Numbers properly formatted into rows and columns.
set delim to ","
set the clipboard to my remplace(the clipboard as text, delim, tab)
on remplace(_t, _delim, _tab)
local l
set AppleScript's text item delimiters to _delim
set l to text items of _t
set AppleScript's text item delimiters to _tab
set _t to l as text
set AppleScript's text item delimiters to ""
return _t
end remplace
tell application "Numbers"
activate
tell application "System Events"
keystroke "v" using {command down}
end tell
end tell
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment