Tables: CSV Import in World Anvil Codex | World Anvil

Tables: CSV Import

Restructuring the Codex

We are currently moving articles around and changing the general structure of the Codex. Please come back later if you get lost!

Step by Step Tutorial

Guild Exclusive

This is a Master+ feature. To get access, Join the Worldbuilder's Guild!

This guide is for you if ...
  • ... you saw the import feature on the interactive tables, but don't know what CSV is.
  • ... you have a CSV table but it fails to import.

This is a step-by-step guide. Follow it carefully. If you get stuck on any step please come to the Discord Server for help!

Creating a table with CSV Import is a bit technical, but it allows you to import any kind of table data that you have in your excel or google sheets document! So you don't have to enter all that data by hand. Or if you want a table in more than one world as you can't copy the tables to other worlds.

Step 1: Create A Table

The import only adds the data inside of the table. It does not affect the metadata like the title, description and options. So before you get started you should set that up.

 

Step 1.1: Setup Columns

Before importing you need to add all the columns of the table. Make sure that you use the right column type as this can fail the import!   But don't worry if you make a mistake or change your mind. You can always fix it and try again! You won't lose any data since you are importing it.

Step 2: Create the Content

Now to creating the content. You can either use Google Sheets or Excel. This guide uses Google Sheets which is recommended as Excel may generate the wrong output that has to be edited. See note in the next section.

Open up a new table and start entering your data. Each row in the table will add a row after the import. A few things to consider:

  • Do NOT add a header row. Or if you do, do not copy it into the input textarea.
  • Do NOT add any COMMAS anywhere in the cells. These will break your import.
  • Always use the | (pipe character) to separate options in the specialized columns.
  • Be careful to not have any typos in the options. They will be ignored otherwise.
 

Column Type Formats

Text & Long Text
In these columns you can enter any text. Be careful with special characters as these can break it.

Number
Accepts any positive or negative number. Ignores decimal points.

Roll
The roll columns accepts a simple range like 1-10. Do not try to enter any other data.

Dice Button
The dice button accepts any roll notation accepted by the BBcode: Dice Roller.

Checkbox
Write true if you want the checkbox to be checked or false otherwise. Each option can be omitted to negate them or write something else.

Image
The image column has a value and two options.
  • Required is the relative URL to an image uploaded on WorldAnvil.
  • Option 1: Display Name
  • Option 2: Open image when rolled?
To get the upload link follow these steps:
  1. Click on the image in the Images & Files Manager.
  2. Click on Advanced Edit.
  3. Click on View Image.
  4. Click on Full View.
  5. Copy the URL from the browser link input field, without the domain (e.g. worldanvil.com).
/uploads/images/cef374a2316d74fbdaf658d7f9a5783a.png|Ancient Guild Member Badge|navigate
Link / URL
The Link column has a value and three options. Each option can be omitted to negate them or write something else.
  • Required is a full url.
  • Option 1: Display Name
  • Option 2: Open image in a new tab?
  • Option 3: Open image when rolled?
 
https://docs.google.com/spreadsheets/u/0/|Google Sheets|tab|navigate
Article
The article column has a value and two options.
  • Required is the relative URL to one of your articles.
  • Option 1: Display Name
  • Option 2: Open article when rolled?
/uploads/images/cef374a2316d74fbdaf658d7f9a5783a.png|Ancient Guild Member Badge|navigate
  Tables
The table column has a value and one option.  
NOTE: The navigate option currently breaks the import. So simply leave it away! If you want to auto-navigate the tables you will currently have to do this manually.
  You can find the identifier of a table if you open the tables editor. The identifier can be copied from the browser url.
 
b86018bd-695c-4ddc-9941-453b4796557d|navigate

Step 3: Export Data into CSV

Google Sheets

Got to this website and create a new sheet. Enter or copy paste your data into the sheet. Once you have setup all your rows you need to export the table.  
HINT: Before entering all your data I suggest that you enter just one row and try the rest of the steps with that one row. To make sure that your input actually works.
Download
Once you entered all the data you can download the file. Got to File > Download > Comma-separated values (.csv, current sheet). Save it somewhere on your computer where you can find it again!

Google Sheets Download Menu

Step 4: Import Data into Table

  1. Navigate to the file in your systems file explorer.
  2. Once you have the file make a right click on it and select the option to open with a different program (might be called differently).
  3. You should open up the file with a text editor. The default text editor on Windows is simply called Editor.
  4. Select all the text in the newly opened window (either with the mouse or press CTRL-A).
  5. Copy the text to the clipboard (either with CTRL-C or via context menu).
  6. Open up the table and press the CSV Import button under advanced options. It is the RED button seen in the image on the right.
  7. Paste the copied text into the modal and press import.
  The import should be fairly fast but will of course take longer the bigger the table is. If the import is successful the table data will be overwritten, stored and then the page should reload.   If it is not successful there is a red flash message on the screen which might tell you what went wrong (which currently doesn't actually happen as it is bugged).

Excel

NOTE: When exporting as CSV from Excel it creates a file with the semicolon character as the delimiter. If that is the case then these semicolons need to be replaced with a comma in the text editor.

Known Issues & Limitations

 
  • Checkboxes can't be imported checked.
  • The navigate option breakes the table import.
  • The image column ignores the navigate option flag.
  • Adding " (double quotes) to the text field prevents it from being displayed.
  • Long Text can't contain line breaks. Since quotes don't work and
    is not interpreted.
  • The import is supposed to tell you if it fails, but currently the error message display has a bug which prevents it from doing so. Open up the console with F12 to see what is going on.
  • The csv export does not consider quotes as delimiter for cells. Which means that none of the cells may contain any commas.

Navigation

Tables
Generic article | Oct 29, 2023

Advanced tables to input and present structured data. The table can be searchable and rollable.


Comments

Please Login in order to comment!
Sep 8, 2021 19:51 by Joshua Jacobs

I hate to ask, but where do I import a table? I have the CSV formatted information and create a new table (under Flora and Fauna). I created the table, hit paste and it didn't work. I'm sorry I can't figure it out, I've been trying

Sep 9, 2021 06:33

Journeyman subscribers do not have access to interactive tables, as stated at the beginning of the article.

Check out my world World Behind the Veil!
Sep 10, 2021 12:34 by Joshua Jacobs

I believe I asked the question in the wrong place. I was just wondering how you import data from an excel table into WA tables. I'll check there. Didn't realize there was a difference.

Sep 10, 2021 12:39

It is not possible to import data via CSV in any other type of table.

Check out my world World Behind the Veil!
Feb 25, 2022 02:29 by Sean Carter

Where is this Import? All I see is a CSV Data block to copy/paste which refuses to do anything when I click "import & overwrite"

Feb 25, 2022 06:20

When editing a table in the Advanced tab under Architecture there is a button to open the import modal. If the import & overwrite doesn't do anything then you are either supplying invalid data (check this guide, it does not support full CSV) or your browser is preventing the working of the modal. Please come to the Discord if you need further assistance. (sorry about the double comment.)

Check out my world World Behind the Veil!
Feb 28, 2022 02:23 by Sean Carter

I see the [Import from CSV] button, when I click it there is not a way to upload a file, only a text box where it seems you are supposed to copy/paste the "CSV Data". If I open the file in a text editor and paste it it does nothing when I hit the [Import & Overwrite].   I wasn't sure where to post in Discord (I am not the most proficient Discord user).

Feb 28, 2022 08:01

Correct there is no file upload. Copy & pasting the CSV text into the textarea is what you need to do.   When nothing happens after pressing the button that means there is an error. One of three issues might cause this:   1. You not not have the columns setup properly in the table. 2. The CSV is not accepted by the table (the table only accepts a subset of CSV and does not actually properly parse all CSV. See the limitations for more info on that in this article. 3. A extension is preventing the proper working of the action. You can test this by trying this out in a private / incognito window of the browser.   On the Discord you can just ask for help in the #help text channel.

Check out my world World Behind the Veil!