<p>You may want to ignore my comment above - I discovered that there's an option to set a <code>dataDelimiter</code> character (<a href="https://docs.craftcms.com/feed-me/v4/get-started/configuration.html" rel="nofollow noreferrer">docs</a>) which should help with your CSV import, as described in <a href="https://craftcms.stackexchange.com/a/36559/8173">this SE answer</a>.</p>

CC BY-SA 4.0
2023-01-26T11:55:41.813Z
Thank you for looking into this! However, as I described in the question, I did use a data delimiter "-|-" and it did not work. The system did not create multiple matrix entries. The delimiter does work for categories, checkboxes, etc. But I can't get it to work for Matrix fields.
Panos Spiliotis
CC BY-SA 4.0
2023-01-26T12:55:26.223Z
Ah, my apologies. I wasn't 100% sure that you'd set the `dataDelimiter` option already from your question. In that case, I would definitely try converting your data to JSON if that's an option.
Martin Spain
CC BY-SA 4.0
2023-01-27T10:20:37.510Z
Unfortunately CSV is the only option at this point for this dataset.
Panos Spiliotis
CC BY-SA 4.0
2023-01-26T09:37:09.467Z
2023-01-26T09:37:09.467Z
Martin Spain
<p>I would like to import a CSV file into but the entries contain Matrix fields. When I set up the file, FeedMe provides a way to map columns in the CSV file to specific Matrix fields but I can't find a way to format the CSV file in a way that will allow FeeMe to generate multiple Matrix entries.</p>
<p><strong>Example:</strong><br />
The CraftCMS entry has a Matrix field called <code>References</code> and this field has one block with two fields: <code>Reference Title</code> and <code>Reference URL</code>.</p>
<p>The CSV file has two columns <code>Reference Title</code> and <code>Reference URL</code> which I have mapped accordingly using FeedMe. For some entries I have multiple references so I need FeedMe to create one Matrix entry for each reference.</p>
<p>I have tried using the delimiter <code>-|-</code> between the title like so:</p>
<pre><code>Reference Title                 Reference URL    
Example Ref1 -|- Example Ref 2; https://example1.com -|- https://example2.com
</code></pre>
<p>but FeedMe generates only one entry that contains both titles and URLs:</p>
<ul>
<li><code>Reference Title</code> ends up as: <code>[&quot;Example Ref1&quot;,&quot;Example Ref 2&quot;]</code></li>
<li><code>Reference URL</code> ends up as <code>[&quot;https://example1.com&quot; -|- &quot;https://example2.com&quot;]</code></li>
</ul>
<p>Is there a way to format the CSV in way that will make FeedMe generate two separate Matrix entries?</p>

CC BY-SA 4.0
2023-01-26T09:31:32.820Z
I don't know if there's an easy solution via CSV formatting, but I've had great success in the past by converting the CSV data to JSON, and then manually formatting the converted data for the Matrix fields where you need multiple entries as arrays. FeedMe seems much happier working with JSON data in general, and it's a lot easier to describe multiple entries for a single field in JSON than it is in a CSV.
Martin Spain
<matrix><plugin-feedme><csv>
Import CSV data using FeedMe plugin into entries with Matrix fields
# Import CSV data using FeedMe plugin into entries with Matrix fields

(Asked by: username_0 on 2023-01-25)

I would like to import a CSV file into but the entries contain Matrix fields. When I set up the file, FeedMe provides a way to map columns in the CSV file to specific Matrix fields but I can't find a way to format the CSV file in a way that will allow FeeMe to generate multiple Matrix entries.
Example:
The CraftCMS entry has a Matrix field called References and this field has one block with two fields: Reference Title and Reference URL.
The CSV file has two columns Reference Title and Reference URL which I have mapped accordingly using FeedMe. For some entries I have multiple references so I need FeedMe to create one Matrix entry for each reference.
I have tried using the delimiter -|- between the title like so:
Reference Title                 Reference URL    
Example Ref1 -|- Example Ref 2; https://example1.com -|- https://example2.com

but FeedMe generates only one entry that contains both titles and URLs:

Reference Title ends up as: ["Example Ref1","Example Ref 2"]
Reference URL ends up as ["https://example1.com" -|- "https://example2.com"]

Is there a way to format the CSV in way that will make FeedMe generate two separate Matrix entries?

**Tags:** matrix, plugin-feedme, csv
> **Comments:**
> **username_1**: I don't know if there's an easy solution via CSV formatting, but I've had great success in the past by converting the CSV data to JSON, and then manually formatting the converted data for the Matrix fields where you need multiple entries as arrays. FeedMe seems much happier working with JSON data in general, and it's a lot easier to describe multiple entries for a single field in JSON than it is in a CSV.  

---

## 1 answers

### Answer by username_1 on 2023-01-26. Score: -1

You may want to ignore my comment above - I discovered that there's an option to set a `dataDelimiter` character ([docs](https://docs.craftcms.com/feed-me/v4/get-started/configuration.html)) which should help with your CSV import, as described in [this SE answer](https://craftcms.stackexchange.com/a/36559/8173).

> **Comments:**
> **username_0**: Thank you for looking into this! However, as I described in the question, I did use a data delimiter "-|-" and it did not work. The system did not create multiple matrix entries. The delimiter does work for categories, checkboxes, etc. But I can't get it to work for Matrix fields.  
> **username_1**: Ah, my apologies. I wasn't 100% sure that you'd set the `dataDelimiter` option already from your question. In that case, I would definitely try converting your data to JSON if that's an option.  
> **username_0**: Unfortunately CSV is the only option at this point for this dataset.  

---

