How to create a template from a SharePoint list that has multiple column types?

Vanessa 301 Reputation points
2024-05-06T13:42:48.1566667+00:00

My SharePoint list has 35 columns: 1 choice; 3 multiple lines of text; 12 person or group; and 19 single line of text. When I try to save the list as a template and include content, I get the following error message:

Sorry, something went wrong
Read error on file "_catalogs/lt/ActiveProjects.stp"

Can I create the template with content?

Thanks.

SharePoint
SharePoint
A group of Microsoft Products and technologies used for sharing and managing content, knowledge, and applications.
9,793 questions
0 comments No comments
{count} votes

Accepted answer
  1. AllenXu-MSFT 16,561 Reputation points Microsoft Vendor
    2024-05-07T02:41:16.7766667+00:00

    Hi @Vanessa,

    I'm afraid no fix to this issue. As said in this article: Error when you save a list or library as a template in SharePoint Online, "You browse to the settings for the list or library in order to save it as a template, and then you select the option to Include Content." may cause this issue.

    As a workaround, I suggest you give a try to save list as template using PnP PowerShell:

    #Parameters
    $SiteURL= "https://xxx.sharepoint.com/sites/xxx" 
    $ListName = "xxx"
    $TemplateFileName = "ListTemplate.stp"
    $TemplateName = "ListTemplate"
    $TemplateDescription=""
    $IncludeData = $True
      
    #Connect to PnP Online
    Connect-PnPOnline -Url $SiteURL -Credentials (Get-credential)
    $Context  = Get-PnPContext
     
    #Get the List
    $List = Get-PnpList -Identity $ListName
     
    #Save List as template
    $List.SaveAsTemplate($TemplateFileName, $TemplateName, $TemplateDescription, $IncludeData)
    $Context.ExecuteQuery() 
    
    
    

    If the answer is helpful, please click "Accept Answer" and kindly upvote it. If you have extra questions about this answer, please click "Comment".

    Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.


0 additional answers

Sort by: Most helpful