Home > CMS- Content Management System > Sharepoint > How to Export SharePoint List Contains Lookup Columns without Data Loss

How to Export SharePoint List Contains Lookup Columns without Data Loss

When we try to save list template that contains lookup field and once imported on the another site every time we need to deleted and recreated the lookup column in the list which result in data loss for that particular column.

   

When we re-create the list in the destination site using the list template in Employee list the data for the Department lookup column has been lost. This is due to Department column still points to the GUID of the Department list of the source site.

To prevent data loss for the lookup column we can use below approach

  1. Note the GUID of the Department list from the Source site by opening the list setting page
  2. Note the GUID of the Department list from the Destination site by opening the list setting page
  3. Download the template file of the List contains lookup column. In our case it is Employee.stp and rename it to Employee.cab
  4. Use WinZip/WinRAR to extract the manifest.xml
  5. Open the manifest.xml any text editor and replace the lookup list GUID with new GUID
  6. Now we need to recreate the list template package file using the “makecab” command in “Developer Command Prompt for VS”

  7. Once the cab file is created rename it to Employee.stp
  8. Re-upload this list template and Re-create the Employee list in the destination site
  9. We can see now that Department lookup field has the data without any loss

This Article is TAGGED in , , . BOOKMARK THE permalink.

One thought on “How to Export SharePoint List Contains Lookup Columns without Data Loss

  1. Very helpful, and resolved the problem I was having with this issue. For others, if you do not have Visual Studio, you can access the Developer Command Prompt for Visual Studio by installing the free Community Edition of Visual Studio from Microsoft.

Leave a Reply

Your email address will not be published. Required fields are marked *

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code class="" title="" data-url=""> <del datetime=""> <em> <i> <q cite=""> <s> <strike> <strong> <pre class="" title="" data-url=""> <span class="" title="" data-url="">