1

When i try to import a termset(in a Site collection) using the .CSV file,i get the below error,

An error was encountered while attempting to import the term set at line 2 of the submitted file. Please ensure that this file is a valid csv file and adheres to the correct format as in the sample file ImportTermSet.csv

I am using the following import text in .csv file

Term Set Name,"Term Set Description","LCID","Available for Tagging","Term Description","Level 1 Term","Level 2 Term","Level 3 Term"

Political Geography,"A sample term set",,True,"One of the 7 continents","Continent","Asia"

Political Geography,"A sample term set",,True,"One of the 7 continents","Continent","Asia1","Asia11"

Political Geography,"A sample term set",,True,"One of the 7 continents","Continent","Asia1","Asia21"

Looks like something is wrong with my syntax in the CSV file but i couldnt find it. Please help

4 Answers 4

1

make sure that the values are correct for CSV.

In your csv file how is is seperated? like so?

hello "," blah "," magic "," sweet

as you can see between each text is "," or ,

now looking at your csv format I can see an issue with:

Political Geography,"A sample term set",,True,"One of the 7 continents","Continent","Asia"

instead ammend it and try:

Political Geography,"A sample term set",True,"One of the 7 continents","Continent","Asia"

I just took out the extra comma as in the error you provided its stating thats where the error is occuring ;) or you can try the following if you want to keep the format i presume todo with the column headers:

Political Geography,"A sample term set", "" ,True,"One of the 7 continents","Continent","Asia"

there needs to be a clear distinction between each comman eg
not to do ,, but rather , , or , "" ,

EDIT

Ok based on your CSV and the error its indicating that the formatting is incorrect! as an example taken from msdn it shows:

"Term Set Name","Term Set Description","LCID","Available for Tagging","Term Description","Level 1 Term","Level 2 Term","Level 3 Term","Level 4 Term","Level 5 Term","Level 6 Term","Level 7 Term"

"Sites","Locations where the organization has offices",,TRUE,,,,,,,,

,,1033,TRUE,,"North America",,,,,,
,,1033,TRUE,,"North America","Washington",,,,,
,,1033,TRUE,,"North America","Washington","Redmond",,,,
,,1033,TRUE,,"North America","Washington","Seattle",,,,
,,1033,TRUE,,"North America","Washington","Tacoma",,,,
,,1033,TRUE,,"North America","Massachusetts",,,,,
,,1033,TRUE,,"North America","Massachusetts","Boston",,,,
,,1033,TRUE,,"North America","Massachusetts","Cambridge",,,,

as you can see it doesnt look similar to yours as i think your missing maybe some commas ;)

so from that assumption I would say that as earlier that your commas need to correlate to the ammount of columns by that i mean in the example above they have 12 columns and 11 commas thoughout!

in your example you have one missing:

Term Set Name,"Term Set Description","LCID","Available for Tagging","Term Description","Level 1 Term","Level 2 Term","Level 3 Term"

Political Geography,"A sample term set",,True,"One of the 7 continents","Continent","Asia"

Political Geography,"A sample term set",,True,"One of the 7 continents","Continent","Asia1","Asia11"

Political Geography,"A sample term set",,True,"One of the 7 continents","Continent","Asia1","Asia21"

so you need to change:

Political Geography,"A sample term set",,True,"One of the 7 continents","Continent","Asia"

which = 7 but your headder = 8

so you need to add anothe , like so:

Political Geography,"A sample term set",,True,"One of the 7 continents","Continent","Asia",

for extra reference for understanding:

http://technet.microsoft.com/en-us/library/ee424396.aspx

http://office.microsoft.com/en-gb/sharepoint-server-help/import-a-term-set-HA101818255.aspx#_Fill_out_the

EDIT

You can use this tool for excel that is referenced in msdn:

http://www.wictorwilen.se/Post/Create-SharePoint-2010-Managed-Metadata-with-Excel-2010.aspx

it is an addon that puts everything in the correct format for you! follow the guide lines! also dont forget that you might need to when finished to open the finished csv in notepad or notepad++ and save in utf-8 instead of ansi

notepad:

enter image description here

or notepad++

enter image description here

Download the Excel 2010 document

You can download the macro-enabled Excel 2010 document here . Unzip the file and open the document (TermStoreCreator.xltm) to create a new workbook.

for the tutorial on the excel document (how to)

http://www.wictorwilen.se/Post/Create-SharePoint-2010-Managed-Metadata-with-Excel-2010.aspx

13
  • Hi Ali, Both the suggested formats didnt work and i got the same error. :( But when i added only one term set(i mean only one row) in the csv file and tried importing it and got a different error "Unable to create new Term Set"
    – George
    Commented Apr 24, 2013 at 11:44
  • can you post the full error here as you see it?
    – Ali Jafer
    Commented Apr 24, 2013 at 11:46
  • I got "Unable to create a new Term set" error when the csv file had the below content only Political Geography,"A sample term set", "" ,True,"One of the 7 continents","Continent","Asia"
    – George
    Commented Apr 24, 2013 at 11:56
  • I got "An error was encountered while attempting to import the term set at line 2 of the submitted file. Please ensure that this file is a valid csv file and adheres to the correct format as in the sample file ImportTermSet.csv " error when the csv file had more than one row with the same format as above contents
    – George
    Commented Apr 24, 2013 at 12:00
  • ahh ok, so now my last question is how did you make the csv? in excel? you need to make sure that its saved in UTF-8 file format. Open the csv in notepad or notepad++ and change to utf-8 formate and save! You can keep your origional CSV format to try first!
    – Ali Jafer
    Commented Apr 24, 2013 at 13:10
0

I had similar problem before:

Always make sure that there are no duplicate terms in the csv file.

I blogged about it here

1
  • Hi and welcome to SP.SE Naim. Your answer may very well answer the question, but on this site, we like to add more of the solution in the content as the link may break in the future. There is no problem adding the link as reference, though. Nice to see you on our site!
    – Benny Skogberg
    Commented Nov 6, 2013 at 8:58
0

You will also find an error importing the Term Set from the csv file if you have more than one row in a single field, i.e., if you are trying to add multiple lines in the Term Description field by using "Alt + Enter" in the field, the carriage return does not get translated. This is confusing because you can have more than one row for the Term Description when using the Term Store Manager tool. The fix is to make sure all your Term Description contents are on a single line in the field, then use the Term Store Manager to add the multiple lines you need. enter image description here

0

TIPS FOR IMPORTING TERMSET TO SHAREPOINT ONLINE

I spent over an hour troubleshooting my CSV file of 350 terms and sub-terms and had to resolve each of the issues documented below. The error handling in SharePoint does not provide very good feedback, so you are on your own to troubleshoot by process of elimination. I hit all of these issues because my source data was exported from Dynamic 365 and so it was not in proper order and contained duplicate data which was difficult to spot with the untrained eye. Not everyone will encounter all of these issues, but I'm sure we've encountered a couple of them.

Always paste into Excel as 'values only' plain text, with no other hidden features or linked to a datasource (may happen when your source data is exported from SharePoint or Dynamics)

Example...

enter image description here

No duplicate terms allowed

Example...

enter image description here

No empty rows allowed

Open your CSV in Notepad and delete any empty rows. Example...

enter image description here

Ensure your terms are in alphabetical order, grouped e.g. so all "United States" entries are in a row, not in different spots.

Example...

enter image description here

Ensure the parent term is positioned immediately above child terms

Example...

enter image description here

ERROR: The input file does not contain a valid term set name. An error was encountered while attempting to import the term set at line 2 of the submitted file. Please ensure that this file is a valid csv file and adheres to the correct format as in the sample file ImportTermSet.csv.

CAUSE: your list may be out of order - your root Term Set title is not in the correct row (hint: should be in top row). Example...

enter image description here

ERROR: An error was encountered while attempting to import the term set at line 91 of the submitted file and some data may not have been cleaned up. Please ensure that this file is a valid csv file and adheres to the correct format as in the sample file ImportTermSet.csv.

CAUSE: you probably have duplicate data in your list (see tip above).

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.