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
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 TextNumber
Roll
Dice Button
Checkbox
Image
- Required is the relative URL to an image uploaded on WorldAnvil.
- Option 1: Display Name
- Option 2: Open image when rolled?
- Click on the image in the Images & Files Manager.
- Click on Advanced Edit.
- Click on View Image.
- Click on Full View.
- Copy the URL from the browser link input field, without the domain (e.g. worldanvil.com).
/uploads/images/cef374a2316d74fbdaf658d7f9a5783a.png|Ancient Guild Member Badge|navigateLink / URL
- 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|navigateArticle
- 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|navigateTables
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!Step 4: Import Data into Table
- Navigate to the file in your systems file explorer.
- 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).
- You should open up the file with a text editor. The default text editor on Windows is simply called Editor.
- Select all the text in the newly opened window (either with the mouse or press CTRL-A).
- Copy the text to the clipboard (either with CTRL-C or via context menu).
- 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.
- Paste the copied text into the modal and press import.
Excel
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.
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
Journeyman subscribers do not have access to interactive tables, as stated at the beginning of the article.
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.
It is not possible to import data via CSV in any other type of table.