Copying Table from Numbers into a Wiki

Quick and Dirty in the IRB

I want to convert a table from Numbers into a Wiki:

Left: Numbers.app. Right: PukiWiki.

When copying cells from Numbers, you get a tab-separated value format.

aaa     bbb     ccc
111 222 333

And the table syntax in the Wiki looks like this:

|aaa|bbb|ccc|
|111|222|333|

Paste ‘em Into IRB

So, I fired up IRB, copied the table from Numbers and pasted it through the use of pbpaste command.

Process ‘em

Then I split them by line.

Looks good so far. Go ahead and turn each line into the Wiki syntax.

Copy ‘em!

Looks great. Let’s copy it by piping the result into pbcopy.

It’s in my pasteboard now. I can now copy into the wiki.

Code, Applied to Life

Stories about how coding can be applied to solve everyday…

Thai Pangsakulyanont

Written by

(@dtinth) A software engineer and frontend enthusiast. A Christian. A JavaScript musician. A Ruby and Vim lover.

Code, Applied to Life

Stories about how coding can be applied to solve everyday life problems. (Formerly Ruby Everyday).

Thai Pangsakulyanont

Written by

(@dtinth) A software engineer and frontend enthusiast. A Christian. A JavaScript musician. A Ruby and Vim lover.

Code, Applied to Life

Stories about how coding can be applied to solve everyday life problems. (Formerly Ruby Everyday).

Welcome to a place where words matter. On Medium, smart voices and original ideas take center stage - with no ads in sight. Watch
Follow all the topics you care about, and we’ll deliver the best stories for you to your homepage and inbox. Explore
Get unlimited access to the best stories on Medium — and support writers while you’re at it. Just $5/month. Upgrade

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store