I need to import a hierarchical codelist but receive this error message: 'Error importing data... row; column; wrong column name'. I am importing it as a zipped CSV.
Any help is appreciated, thanks!
I need to import a hierarchical codelist but receive this error message: 'Error importing data... row; column; wrong column name'. I am importing it as a zipped CSV.
Any help is appreciated, thanks!
Accepted answer
In order to import a codelist you should follow the naming that you gave to the different levels of your hierarchy.
If for instance you have a three-level hierarchy codelist with Category -> Subcategory -> Subdivision

The the CSV file should have at least 9 columns 1 with code, 1 with label, 1 with description (in case you only have one language set in your survey, i.e. English). You should import the codelist as a CSV rather than a ZIP.
category_code,category_label_en,category_description_en,subcategory_code,subcategory_label_en,subcategory_description_en,subdivision_code,subdivision_label_en,subdivision_description_en
1,1,,,,,,,
1,1,1 desc,1a,a,1a desc,,,
1,1,1 desc,1a,a,1a desc,1a1,1,1a1 desc
1,1,1 desc,1a,a,1a desc,1a2,2,1a2 desc
1,1,1 desc,1b,b,1b desc,,,
1,1,1 desc,1b,b,1b desc,1b1,1,1b1 desc
1,1,1 desc,1b,b,1b desc,1b2
Thanks, do you mean that I need to create and label each level within Collect under 'code lists' ? I have 11 columns, so I created 11 columns of the same name. However, I am still getting the same error message (row: 1, columns: name, Type: Wrong column name). I am importing as a CSV now.
Accepted answer
When you export the codelist what do you get? The codelist that you import should look the same than the one you export (I mean the structure)
Before you import anything you need to create the levels of the hierarchical codelist...
I'm not sure what you mean. I can't import the codelist so there is nothing for me to export.
So, I have 11 columns and should create 11 columns within collect to correspond. For example, in the csv the attributes are labelled 'attribute_label', 'attribute_code', 'attribute_description'. Do the names for the levels need to look exactly the same?
I understand what you mean now!
The order of the attributes that collect spits out is different from mine. For example, I have '_label', '_code', '_description' but collect shot out '_code', '_label_en', '_description_en'.
Once you sign in you will be able to subscribe for any updates here