Tips for using Numbers, Pages and TextEdit for creating CSV files

 

I've used Appleworks spreadsheets and the AW word processor to make .csv files in the past. Since AW is pretty long in the tooth and no longer supported nor distributed with the Mac, I decided to try to use the newer iWork apps Numbers and Pages to create .csv files of POIs.

I spent several hours discovering some unexpected pitfalls and figuring out how to work around them.

Numbers:
On the surface, pretty straightforward. Set up a 4-column table for Longitude, Latitude, Name and Comments, then export it as a .csv file and edit it further as necessary. However, here's how to avoid some problems;

-Make sure that in Preferences/Auto-correction Use Smart Quotes is OFF. Otherwise you will get some bizarre symbols in the text on the GPS

-Put quotes around entries in columns C and D, BUT if there is a comma within the text in either column, do not put quotes around it. Quotes will be added automatically when you export to a .csv file.

-I use a special symbol like %% in column D for line breaks in multiline quotes so I can do a find and replace with a word processor in the .csv file to replace them with real line breaks.

-Make sure when you export to a .csv file that the text encoding is set to Western (Mac OS Roman) and not Unicode, or you'll get a file that Garmin POI Loader won't recognize as a valid csv file.

Pages:
The tip here is don't use it to do the find and replace. When you save the result to a new text file it will be encoded in Unicode and not recognizable as a valid .csv file (see above). I can't find any way to change the encoding- the Western (Mac OS Roman) setting is grayed out.

TextEdit:
Edit/Find works fine for doing a find and replace of %% with real line breaks. The only problem is that it is not obvious how to put a line break in Find's Replace field. You can do this by pressing Option-Return in the Replace field. Nothing will appear there, but it will work. The only catch is that it stays there; there is no way to remove it from the Replace field other than quitting TextEdit and restarting it.

I hope this is useful for other Mac users.