Re-Released: Convert Table to CSV or JSON (wither filters!)

Hey friends!

After a few bug fixes, I just re-released a pack that converts any table to JSON or CSV. It supports filtering, arrays, and blank cells.

Here’s a test doc showing off its formulas and capabilities.

Notes:

  • Because Coda does not allow full table retrieval through packs, each column must be added separately.
  • Because Coda does not allow retrieval of column names through packs, you must add a name for each column as a separate parameter.
  • For now, JSON responds with an array of flat objects (i.e. no nesting), each row represented by a single object. I’ll try to include nesting in future updates, but this is tricky.

Hope you find this useful!

(and if you know of a clever way to retrieve columnNames via Packs, please share!)

5 Likes

@Piet_Strydom @jannis - here ya go!

2 Likes

Super exciting! Can’t wait to take this for a spin.

Hi! Great pack, thank you! One question: for the “to JSON” is there a way to cast columns as int instead of strings? All of the fields in the JSON results are strings.

3 Likes

Hey Jules, great recc! There’s no way at the moment, but I’ll add this to the updates list. Thanks!

1 Like

The Export Tables pack brings in the column names as a header row when exporting to CSV or XLS:

2 Likes

Actually, I’ve figured out a much better/faster way to do this with Coda formulas (and a helper table)

3 Likes

Thaty is incredibly cool! Worked really well - wished I’d realized it was here last weekend when I was manually recreating tables! Thank you!

1 Like

Hi @Jon_Dallas is there also a way to download result as csv file?
I’m trying to download a table in csv by pressing a button but other packs as a sync issue so sometimes the file has an old table version (like 1 or 2 minutes before)

1 Like

Heya @Stefano_Falzaresi - glad you’re digging the pack.

According to Coda’s Pack Documentation, packs cannot directly trigger file downloads to a user’s local filesystem.

One solution would be to use copytoclipboard([yourCsvColumn]).

Another solution might be to use the other packs you mentioned, but manually sync the table before downloading.

2 Likes

Eric has a functioning workaround for downloading files, check out his Temp File pack!

3 Likes

Thx to both of you, I’ll try the temp file pack but I’m also interested in syncing the table manually, can I do it with a button or formula?

1 Like