Skip to main content

Posts

Showing posts from September, 2010

Taxonomy Export in SharePoint 2010

find the below code is helpful for taxonomy export public class SimpleCSVExport { public string ExportTermSet(string GroupName, string TermSetName) { StringBuilder exportData = new StringBuilder(); exportData.AppendLine("\"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\""); SPSite osite = new SPSite(siteUrl); TaxonomySession session = new TaxonomySession(osite); TermStore termStore = session.DefaultSiteCollectionTermStore; Group group = termStore.Groups[GroupName]; TermSet termSet = group.TermSets[TermSetName]; foreach (var topTerm in termSet.Terms) { e...