Take the 2-minute tour ×
SharePoint Stack Exchange is a question and answer site for SharePoint enthusiasts. It's 100% free, no registration required.

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

share|improve this question
add comment

2 Answers 2

up vote 1 down vote accepted

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

share|improve this answer
    
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 Apr 24 '13 at 11:44
    
can you post the full error here as you see it? –  ali Sharepoint Apr 24 '13 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 Apr 24 '13 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 Apr 24 '13 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 Sharepoint Apr 24 '13 at 13:10
show 8 more comments

I had similar problem before:

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

I blogged about it here

share|improve this answer
    
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 Nov 6 '13 at 8:58
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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