Question

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

Was it helpful?

Solution

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

OTHER TIPS

I had similar problem before:

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

I blogged about it here

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

Licensed under: CC-BY-SA with attribution
Not affiliated with sharepoint.stackexchange
scroll top