Ordinary Human Language

by Brian Crane

Exporting a Note to a Spreadsheet

I wanted to give at least one example of an output that is not defined by the printed page and is not designed to be read by a human being.

So here, I’ll explain how to export information from your notes into a .csv file that can be read by and imported into most spreadsheet programs.

The process for making this .csv file are exactly the same as the process used to make my initial form letter, and what follows assume you are familiar with that post.

Writing the Sample

As with all the examples I’ve given, the starting point is a written example of the output I want Tinderbox to create. In this case though, what that written output should look like isn’t obvious. What I know is that when I import my book notes into Numbers, I want them to look like this:

To create that row in Numbers, I need to create a .csv file that the application can read. I’m not a computer scientist and don’t know what that file looks like (seriously, I don’t), so I google it and wind up on Wikipedia and learn that a .csv file:

I can do that.

So I write out my sample .csv row in a note and end up with this:

I don’t know if spaces after the commas are required or allowed, so I try without them. If they are required, I’ll edit the template later to add them.

According to Wikipedia, there are also nuances in the format: you can import column headers for example. If you need these, you can figure them out and adjust your sample to include them.

Creating the Template

With the finished sample in hand, converting it to a template is easy. Just replace the specific data with the export code used in the other examples—^value()^ unless if it’s one of the exceptions—and you wind up with this:

Export: Copy-Paste

When I use .csv export (which I do pretty regularly), I never actually export the notes. I switch to preview, select and copy the preview text, and then paste it into a new .txt document. From there it’s ready to import into Numbers, Exel or whichever other spreadsheet you use.

The other export examples are here.

Posted July 8, 2017