Paste from CSV into Numbers

I was shocked to realize that Apple’s Numbers app doesn’t properly handle it if you try to paste CSV data in. It seems like such a simple oversight.

Luckily, a little searching online turned up an AppleScript script by Koenig Yvan. I made some tweaks and ended up with this:

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

As I did with my View Artist on AllMusic script, I use FastScripts to setup a keyboard shortcut like ⌘⇧V in Numbers.

Now we’re living the dream.

Add Your Comments

Disclaimer
Your email is never published nor shared.
Required
Required
Tips

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <ol> <ul> <li> <strong>

Ready?