<p>As per the docs...if you add <code>config/feed-me.php</code> to your project containing</p>
<pre><code>&lt;?php

return [
    '*' =&gt; [
        'dataDelimiter' =&gt; '-|-',
    ]
];
</code></pre>
<p>and format your CSV like</p>
<pre><code>id,title,categories,city
17746,Imported title,Category 1-|-Category 2-|-Category 3,Bradford
</code></pre>
<p>should get you where you want to be.</p>

CC BY-SA 4.0
2021-08-11T12:47:18.563Z
2021-08-11T12:47:18.563Z
Steven
<p>I am trying to import some categories from a CSV into Craft entries (a categories field). Everything else imports ok apart from the categories</p>

<p>I have created the categories in admin with the same name as the CSV categories but when I import nothing gets selected. </p>

<p>I have the categories formatted in one column in the CSV seperated with a comma .e.g "Branding,Marketing,Design," (I read somewhere this is how it can be done).</p>

<p>Any ideas anyone?</p>

<p>Thanks 
Malcolm</p>

CC BY-SA 4.0
2019-11-01T13:34:47.533Z
Does it work if you just import one category? As far as I remember, you'll have to use a different delimiter if you're importing multiple relations per cell, see "dataDelimiter" here: https://docs.craftcms.com/feed-me/v4/get-started/configuration.html
Udo
<plugin-feedme><import>
Feed Me Import Categories from CSV
# Feed Me Import Categories from CSV

(Asked by: username_0 on 2019-11-01)

I am trying to import some categories from a CSV into Craft entries (a categories field). Everything else imports ok apart from the categories

I have created the categories in admin with the same name as the CSV categories but when I import nothing gets selected.

I have the categories formatted in one column in the CSV seperated with a comma .e.g "Branding,Marketing,Design," (I read somewhere this is how it can be done).

Any ideas anyone?

Thanks
Malcolm

**Tags:** plugin-feedme, import

> **Comments:**
> **username_1**: Does it work if you just import one category? As far as I remember, you'll have to use a different delimiter if you're importing multiple relations per cell, see "dataDelimiter" here: https://docs.craftcms.com/feed-me/v4/get-started/configuration.html  

---

## 1 answers

### Answer by username_2 on 2021-08-11. Score: 4 | Accepted answer

As per the docs...if you add config/feed-me.php to your project containing
 [
        'dataDelimiter' => '-|-',
    ]
];

and format your CSV like
id,title,categories,city
17746,Imported title,Category 1-|-Category 2-|-Category 3,Bradford

should get you where you want to be.


---

