No way to create a new table from a CSV if no tables exist in doc

When creating a new table, if another table in the document already exists, one gets this very useful dialog:

// Image in code block, as "new users can only upload one media element"
![image|581x499](upload://vnwDYRGqwU2aObRQOCm9xhR5Qof.png)

However, if the document does not contain other tables, this dialog does not appear, and creating a table just inserts the usual placeholder data:

// Image in code block, as "new users can only upload one media element"
![image|690x289](upload://g16KnvKbQtjWkhrkb6mt5QMBZkb.png)

From there, the only way to import data from a CSV is to right click and select “Import CSV…”, which expects the CSV columns to be mapped to existing columns and does not even provide a way to create new columns when the existing columns are not sufficient:

The actual bug here should be pretty easy to fix: I imagine the reason the import dialog doesn’t appear for the first table is that in the past this dialog only served to import data from another table, and the conditional for displaying it has not been updated.

However, there are also some enhancements that could be made to the process of importing CSV data to an existing table to make the process smoother:

  • “Create new column” option so that users don’t need to abort the process, create extra columns, then restart it.
  • An attempt to guess the correct column names could save user time. Currently even column names that are identical or only differ in casing had to be matched manually.

PS: This is likely specific to my CSV, but when I tried to import it into a new table, Coda kept crashing, whereas importing it into an existing table worked fine.

Hey @Lea_Verou! This actually sounds like a feature request the Coda team has been tracking to improve the CSV importer UI. That said, we have moved this post into the Suggestion Box for other members of the Community to chime in on this. We’ve gone ahead and tracked your vote for this feature formally.

Hi Shaina, the latter part is indeed a feature suggestion, but the primary topic of my post is a bug: There is no reason the “import CSV into a new table” flow does not appear for the first table in a doc, but appears for the 2nd, 3rd etc tables. That is very clearly a bug. The rest about improving the CSV import yes, is a feature suggestion. In retrospect, I should have created separate posts so you can track them separately. I can do that now if you want.