How to export and import a list or a library is shown here, right now!
The great thing about this is, that if you import the webpart in an subsite, both webparts are synchronised.
First you navigate to your list or library which you want to export and import to a other site.
In my case it is the list called “Testlist”.
Now click under the ribbon tab “LIST” the button “Edit list”.
The SharePoint Destroyer, ähhh Designer will open up. You have to right click the “All Items”-View and edit that in the advanced mode.
Now one of many SharePoint Designer Bugs (or Feature?).
Click in a line of the code. I clicked in line 23 (if you are interessted) (1). After that, suddenly a new ribbon tab is shown called “Web part Tools” (2).
Click on that and after that, click on “To File” (3). That is a way to save the webpart.
Save now the webpart at a location of your choice.
Open the file with an editor of your choice. I like Notepad++.
In this tutorial you will find the line 59 and in there the “WebId”. This is the reason why you can not import the webpart directly.
Because it is filled with zeros the webpart can not be imported. We will fix this right now.
In my case, I need the id of the site https://xxx.xxx.xxx.xxx.xxx.xxx.xxx.english
So, how to get the WebId? There are a couple of different methods, but for my the simplest is:
Open the SharePoint Management Shell as Administrator and type in:
$SPWeb = get-spweb http://your-url/your-subsite
The $SPWeb is not necessary but I always want to double check.
Now you’ve got the WebId which you have to paste in the webpart file instead of the zeros. After that, save the file.
You can now open up a subsite of your original list or library and import the webpart.
Edit the subsite and click in the ribbon into the “Insert” Tab and then on “Upload a Web Part”. Select your webpart and upload that.
Now you can select the uploded webpart under the category “Imported Web Parts” and add it to your site.
That’s it. You’ve got your webpart exported and imported into a subsite in your farm. Nice one!
Do you want to see a YouTube channel? Please comment below and me know.