Imaging the following situation where you want to export an XSLT List View web part and embed it on a different site. So the good thing about this it’s easy to accomplish. I came across a great article posted by Glyn on his blog how to export an xslt viewer web part. He shows in his article some really great insight how the xslt viewer web part can be exported. The only thing he left out is that you can export XSLT List View web parts using SharePoint Designer. This feature is really well hidden in the ribbon.
In SharePoint Designer simply select the XSLT List View web part you want to export. In the Ribbon you will find a specific menu for this web part. Ribbon for the web part comes up you can select inside the “Web Part” Tab. In the far right area of the ribbon you will find two really helpful menus.
The “To Site Gallery” option will copy the web part to your site collection web part gallery. You will also be asked how you want to name your web part, description and you will be able to change properties.
Another option to select is if you want to use it relative to any site where the web part will be embedded or get data only from the current site.
The “To File” option will open the download dialog to store the web part and the configuration to a file.
As you see it’s easy to export a XSLT list view web part and use it the way you like. You can also cross embed lists from one web into another.
Firstly, thanks for your post! I have followed above steps but there were some issues. I’ve got a XSLT list view webpart and it’s customized through CALM query (by filter) and xsl code. No problem when I export this webpart to file .webpart and to webpart gallery as well. But in both 2 cases I did, imported webpart was not showed as original webpart.
I’ve checked code webpart in the page and I found that the CALM query and some properties were modified.
30
Please show me what I should do to fix this problem?
Thanks in advance!
Hi,
hard to say without code or screenshots. Can you please be more specific ?
kind regards
Stefan
Hi,
Thank you for the post!
Is there a way to use a Query String Filter with the exported web part ?
Thanks!
Hi,
not as far as I know. Sorry
Kind regards
Stefan
Thank you Stefan! You have saved my day with this!
Hi Stefan,
I tried doing the first method and inserted the web part to a different page and received the following error upon saving:
“Error Rendering Control
An unhandled exception has occurred.
Cannot instantiate type ‘ErrorWebPart’ because it is not public.
Can you help me figure this out?
Appreciate it.
Which kind of SharePoint you are on? If you use SharePoint 2013 you have to make sure that the list view renders in classic view.
Haven’t use this method for a long time. The last i did was in 2010.
/Stefan
4 months too late, but any chance you can tell me how to make sure the list view renders in classic view? 2013 got rid of Design View of course and it’s ruining my life. All I can see is Code. Any suggestions??
Edit the web part page in your browser. Just select the gear icon in the right side of the header and choose ‘Edit Page’. Then you can edit the web part properties. In those properties you will find a check box that says ‘Server Render’. If you select this and hit the apply and ok button you will see the web part renderering in the old classic view.
So SharePoint Designer needed for this task.
Hey Stefan!
Thank you for that post! I tried to export a blog, but it’s not looking exactly like the original blog on my subsite. The title size an font are correct, but Frame around the Posts are missing. Is there any chance I can make it look like that?
IS:
http://www.bilder-upload.eu/show.php?file=1f6575-1470034947.png
SHOULD:
http://www.bilder-upload.eu/show.php?file=520b55-1470034997.png
Hi Raphi,
for exporting blog posts some additional steps are required. This is covered in blog post that Marc Anderson wrote a while ago.
http://sympmarc.com/2013/04/06/displaying-blog-posts-in-different-sites-in-sharepoint-2010/
/Stefan
Is there a specific web part you like to export? Have you tried to export it directly via the user interface?
/Stefan
Hi Stefan,
Thank you for the post! I am encountering some problems. so I saved my view from SPD selecting the To File option, so I can use it to display in another site, However when I upload the file and try to load it gives me the error “List does not exist. The page you selected contains a list that does not exist. It may have been deleted by another user.”. Also I am never prompted if I want to use it relative to any site where the web part will be embedded or get data only from the current site. It just saves the file. Any help? Thank you!
Sadly this hint only works partially with SharePoint 2013/2016. You should check if you are able to apply proper List and Web Ids in the webpart xml directly.