How to use SharePoint ".stp" files in SharePoint 2013

1 comment

Hi All,

When we are migrating from SharePoint 2007 to SharePoint 2013, Generally most of the People will use tools like “Meta Logix” and There will be a case where we should not use “Meta Logix”, So how will migrate Lists from 2007 to 2013. Following post is about a scenario  like how to  Share Point 2007 “.stp” files to create lists in Share Point 2013.

We cannot use SharePoint 2007 “.stp” files directly in SharePoint 2013 Environment.

Step 1:

Copy your SP 2007 “.stp” to Physical Folder of the Server.

Step 2:

Rename the “.stp” file to “.cab” file.

Step 3:

Now, extract the cabinet file by right clicking on that Cabinet File. On Extracted Folder you will find the Manifest.xml File

Step 4:

Open the Manifest.xml file with Visual Studio 2013.

Step 5:

Now create another “.xml” File Say “NewList.xml” .

Fields

Step 6:

Find the <Fields> tag in Manifest.xml and Copy that entire (<Fields>…</Fields>) and paste it into NewList.Xml

Step 7:

Remove All default columns from the NewList.xml File. (LinkTitleNoMenu, LinkTitle, ContentTypeId, _ModerationComments, File_x0020_Type, ColName=which are starts with ‘tp’, Edit, SelectTitle, InstanceID, FileRef, FileDirRef, Last_x0020_Modified, Created_x0020_Date, FSObjType, PermMask, FileLeafRef, ProgId, ScopeId, UniqueId, HTML_x0020_File_x0020_Type, _EditMenuTableStart, _EditMenuTableEnd, LinkFilenameNoMenu, MetaInfo, LinkFilename, DocIcon, ServerUrl, EncodedAbsUrl, BaseName)

Step 8:

Now remove below attributes from the each field.
SourceID, ColName, RowOrdinal, Version

Data:

Step 9:

Find the <Data> Tag in Manifest.xml and copy the entire tag and paste the same to NewList.xml
Note: I have created NewList.xml file as per my convenience.

Step 10:

Create Empty Share Point Project and add List Template to it.It will contain the List Definition (Elements.xml and Schema.xml) and List Instance (Elements.xml)

Step 11:

Paste all your fields from the NewList.xml File to Schema.xml file of SP Project.

Step 12:

If you want to create list with including Data, follow the below steps:

Step 13:

Open Elements.xml file which is under List Instance.
<ListInstance Title="Requisitioner Details"
                OnQuickLaunch="TRUE"
                TemplateType="100"
                Url="Lists/Requisitioner Details"
                Description="My List Instance">

    <Data>
    < Rows >

      <!--Paste you data here-->
    </Rows>

     
    </Data>
  </ListInstance>

Step 14:

Remove all fields from each <Row>
  <Field Name='ContentTypeId'></Field>
  <Field Name='LinkTitleNoMenu'></Field>
   <Field Name='LinkTitle'></Field>
   <Field Name='ID'></Field>
          <Field Name='ContentType'> </Field>
          <Field Name='Modified'></Field>
          <Field Name='Created'></Field>
          <Field Name='Author'> </Field>
          <Field Name='Editor'> </Field>
          <Field Name='owshiddenversion'></Field>
          <Field Name='WorkflowVersion'></Field>
          <Field Name='_UIVersion'></Field>
          <Field Name='_UIVersionString'></Field>
          <Field Name='Attachments'></Field>
          <Field Name='_ModerationStatus'></Field>
          <Field Name='SelectTitle'></Field>
          <Field Name='Order'></Field>
          <Field Name='GUID'></Field>
          <Field Name='FileRef'></Field>
          <Field Name='FileDirRef'> </Field>
          <Field Name='Last_x0020_Modified'></Field>
          <Field Name='Created_x0020_Date'></Field>
          <Field Name='FSObjType'></Field>
          <Field Name='PermMask'></Field>
          <Field Name='FileLeafRef'></Field>
          <Field Name='UniqueId'></Field>
          <Field Name='ProgId'></Field>
          <Field Name='ScopeId'></Field>
          <Field Name='_EditMenuTableStart'></Field>
          <Field Name='_EditMenuTableEnd'></Field>
          <Field Name='LinkFilenameNoMenu'></Field>
          <Field Name='LinkFilename'></Field>
          <Field Name='ServerUrl'</Field>
          <Field Name='EncodedAbsUrl'> </Field>
          <Field Name='BaseName'></Field>
          <Field Name='MetaInfo'></Field>
          <Field Name='_Level'></Field>
          <Field Name='_IsCurrentVersion'></Field>

Step 15:

Deploy your solution and check.

You can download the sample solution from the below link. 

 Download Link:

https://sites.google.com/site/sharepointkitchenblog/PO_RPM.7z


Thanks.

Related Post

1 comment: