Craft CMS Asked by user2945489 on June 13, 2021
I’m attempting to use FeedMe to import a CSV list of entries exported from Google Sheets. I have a column labeled "Categories" and an entry with category1,category2
as the value. I set up the feedMe job pointing to the CSV and the categories field to point to this column. However it is not importing/creating two categories (the expected behavior)rather it is just creating one category with the name "category1,category2" — am I doing something wrong as far as how to list out multiple categories in CSV? Can Feedme handle a comma separated list like this?
If I convert the sheet to a json, it produces: "Categories": "Category1, Category2"
which does not work either – however if I edit the json to be "Categories": ["Category1", "Category2"]
that works – but manually editing it is not really an option on my final spreadsheet as it will have over a 1000 entries.
If there’s an easy way to convert the sheet/csv to correct Json I’d be open to that too.
Any help would be appreciated.
You can do this with CSV by setting a dataDelimiter
in a config/feed-me.php
files (see docs).
If you set the dataDelimiter
to be |
for example, then your CSV could be:
"title", "Categories"
"Some title", "Category1|Category2"
Doing this should let you import multiple categories from CSV.
Correct answer by Oli on June 13, 2021
Get help from others!
Recent Answers
Recent Questions
© 2024 TransWikia.com. All rights reserved. Sites we Love: PCI Database, UKBizDB, Menu Kuliner, Sharing RPP