Managed metadata input file format (SharePoint Server 2010)

SharePoint 2010

Si applica a: SharePoint Server 2010

Ultima modifica dell'argomento: 2016-11-30

Managed metadata in SharePoint Server 2010 is imported from a comma-separated values (csv) file. Each file must contain one term set, and the terms within the term set may be nested as many as seven levels deep.

Even if your organization does not have data to import, you could consider creating your taxonomy outside the Term Store Management tool, and then importing the taxonomy. The Term Store Management Tool provides a convenient, simple way to create term sets and manage terms, but using it to create many term sets might take longer than importing the term sets. The Term Store Management Tool is convenient to use for the day-to-day management of term sets after the term sets have been created.

In this article:

Before reading this article, you should understand the concepts described in the Panoramica dei metadati gestiti topic.

The managed metadata import file is a comma-separated values (.csv) file that contains a header row and additional rows that define the term set and the terms in the term set.

The first line of the file must contain 12 items separated by commas. Consider these items to be column headings (such as in a table) for the values that you will provide in the next lines. It is good practice to enclose each value in quotation marks ("").

The following line is the first line from the sample managed metadata import file. For more information about how to view the sample managed metadata import file, see View a sample managed metadata import file.

"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"

The second line of the managed metadata import file represents the term set, and should contain the following information, in the order specified:

  1. The name of the term set

    It is recommended that the name of the term set, the name of a term, and all descriptions be enclosed in quotation marks (""). Quotation marks are optional, unless the value itself contains a comma. It is safer always to use the quotation marks.
  2. A comma (,)

  3. Optionally, a description of the term set

  4. Two commas (,,)

  5. The word TRUE or the word FALSE that indicates whether users should be able to add the terms in this term set to Microsoft SharePoint Server items. If you do not provide a value, the term set is available for tagging.

  6. Eight commas (,,,,,,,,)

The third line of the managed metadata import file and each successive line represents a term. Separate the values in the third line and in each successive line with commas. You may omit an optional value, but do not omit the accompanying comma, because commas are required as separators regardless of whether values are present.

The values in a line represent the following information, and must be provided in the order in which they are listed:

  1. Term set name: Leave this value blank.

  2. Term set description: Leave this value blank.

  3. Locale identifier: The decimal value that identifies the locale that corresponds to the language of the term. If you do not provide a value, the default locale of the term store to which you import this managed metadata is used.

  4. Available for tagging: This value determines whether users should be able to add this term to a SharePoint Server item. Use the word TRUE to let users use the term; use the word FALSE to forbid users to use the term. If you do not provide a value, users can use the term.

  5. Term description: A description of the term. This value is optional.

  6. Level 1 term -- level 7 term: If the term set is organized as a hierarchy, a level 1 term is a term at the top of the hierarchy, a level 2 term is lower than a level 1 term, and so on. You must provide a value for all levels down to the level of the term that you are representing. This is best illustrated by the example that follows this list.

In this example, you want to import a term set that represents all the office locations of your organization. The term set will be organized hierarchically. The following list is a fragment of the term set:

  • Sites (term set)

    • North America

      • Washington

        • Seattle

        • Redmond

        • Tacoma

      • Massachusetts

        • Boston

        • Cambridge

“North America” is a level 1 term. “Washington” and “Massachusetts” are level 2 terms. “Redmond”, “Seattle”, “Tacoma”, “Boston”, and “Cambridge” are level 3 terms. To import this term set, you would use a file that contained the following lines:

"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",,,,
It is possible to combine the line that defines the term set (line 2) and the first line that defines a term (line 3). This is done in the sample import file.

You cannot represent synonyms or translations of terms by using a managed metadata import file. To create synonyms or translations you must either use the Term Store Management Tool or write a custom program to import and add the synonyms or translations.

See Wictor Wilén's blog ( for information about a tool to import term sets that was developed by a member of the SharePoint community.

You can view a sample import file by clicking View a sample import file from the properties pane of a managed metadata service in the Term Store Management Tool. The simplest way to create an import file for your term set is to use the sample import file as a template. Save the sample import file; delete everything except the first row. Then add more rows to represent your term set and terms.

For instructions about how to import metadata, see (