Tuesday, March 16, 2010

Opening a Tab-Delimited "CSV" in Apple iWork Numbers

I like Numbers, from Apple's competent and beautiful iWork suite, but there are still things where it is different from Microsoft Excel, and hence it feels somewhat unfamiliar at times. For example, although Excel has never been good at handling text files saved in UTF-8 format (a big deal for those of us who work in Asia), it does have a nice Wizard for importing CSV or TSV text files.

Some applications export text files with tab-separated values, and put a CSV extension on them. Actually, CSV stands for "Comma Separated Values" where these are really "TSV" or "Tab Separated Values." When you try to import such a CSV file, Numbers will mash all the fields into one cell in the left-most column. That makes sense, because it's looking for commas judging by the CSV extension. Finding none, it just lets the data pile on.

How to Import a Tab-Separated "CSV" in Numbers

If you have a tab-separated CSV, here's how to open it:

  1. Save the file somewhere you can find it.
  2. Rename the file in Finder, so that it has a .TXT extension.
  3. Ctrl-click the file and choose "Open With" and "Numbers".

Now the data will open correctly, with each field getting its due, and you'll get the added benefit of Numbers not munging any Japanese or Chinese characters.

Hope this tip helps someone. Enjoy!