Hey Coda, I have this string of CSV, but I need to make this info more usable. Will you turn this CSV into a list?
ParseCSV() has one parameter and one additional, optional parameter:
CsvString
ParseCSV(CsvString, Delimitor)
The string of CSV text that you want to break apart.
Delimiter
ParseCSV(CsvString, Delimiter)
The character to note the beginning/end of each list value. Defaults to ",".
What is a CSV?
A CSV file is short for a Comma Separated Value file. CSV files are simply the file-type which Excel, Google Sheets, or Apple Numbers reads. A spreadsheet! CSV files hold, as their name implies, values separated by commas.
Example CSV file
name,age,state
john,42,california
susie,32,arizona
samantha,21,new york
The above example CSV file would look like this inside of Google-Sheets:
What is ParseCSV()?
The Coda formula ParseCSV() allows formulaic control over a CSV file. Specifically, it returns a list-of-lists. The gray column below titled Parse CSV holds a list of 3 items. Each list item is itself a list that contains three text values. Play around with the two yellow select-columns below to see how each value within the larger CSV file is actually accessible to you.
Example CSV
CSV File
Parse CSV
Entry __ from the CSV file
Show me their
Result
CSV File
Parse CSV
Entry __ from the CSV file
Show me their
Result
1
john,42,california
susie,32,arizona
samantha,21,new york
ParseCSV can be used in a some pretty powerful ways to create advanced archiving systems in Coda or as a means to store a massive amount of data within a Coda doc without growing total row-count. These advanced methods are better explained in video:
Use ParseCSV() to store large amounts of data in a document
Use ParseCSV() to create an archive system in-document
Practice: Use ParseCSV on a CSV list to find out how many rows of information are in the file
Done
Filter through a CSV file to find metadata on the data within