11

I am trying to export a list view webpart as a .dwp file so I can have a look at the XML. However, the export option is missing. My initial thought was to try something like the this link

However, even the Export Mode option under Advanced appears to be missing. I can do an export of, for example, a content editor web part without issue.

Any thoughts?

Edit - I just read the comments on that page I linked to. They indicate a list view web part cannot be exported. Seems a bit odd since I don't remember seeing this issue on SP 2007.

1
  • 1
    We've had some success using SharePoint Designer 2010 to open a site on which the web part was created, and then saving that to a file via the Web Part menu (saves as .webpart).
    – Christine
    Commented Aug 9, 2011 at 18:14

5 Answers 5

20

Glyn Clough has a nice solution for exporting xsltlistviewwebpart

Update 2014-09-19

I have found another way to easily export any web part from a SharePoint page, without needing to update web part properties:

Here is the most important text from the blog post:

In SharePoint there is a hidden application page that exports web parts: /_vti_bin/exportwp.aspx. This page takes two query parameters:

  • pageurl. The absolute url of the page where the web part resides that you want to export
  • guidstring. The guid that is called webpartid in the markup on the page

So, suppose, you have this site: https://intranet.contoso.com and a web part (id: 0c3adfe9-8f5d-4432-918a-42410e4e324d) on a page https://intranet.contoso.com/Pages/default.aspx

This will be the resulting URL to export your webpart:

https://intranet.contoso.com/_vti_bin/exportwp.aspx?pageurl=https://intranet.contoso.com/Pages/default.aspx&guidstring=0c3adfe9-8f5d-4432-918a-42410e4e324d

Paste it into the web browser address bar and you'll download an xml file with your web part definition. This method works in SharePoint 2010 and SharePoint 2013 and even in SharePoint Online (Office 365).

3
  • 2
    Even now, in 2015, it's extremely useful thing and works in sp online! Thanks! :) Commented Sep 17, 2015 at 13:43
  • @Anatoly Mironov - I am able to use your method to export the webpart file fine, but when I import and go to install on another site, I get an error that says "List dos not exist. The page you selected contains a list that does not exist. It may have been deleted by another user." Is there a fix for this?
    – cbbrown
    Commented Aug 24, 2017 at 12:50
  • It might be a silly question but how to retrieve the web part guid?
    – YogaPanda
    Commented Dec 15, 2017 at 17:52
1

The List view webpart is not exportable out of the box i'm afraid. There are 2 ways to do this:

  • first way to do this is as sssreddy said: export the site as wsp, open it (rename to .cab) or import it in Visual Studio. YOu can then find the schema, put that in a .webpart file, change the export mode in the schema import it into your site and now it will be exportable.

  • Another way would be use powershell to opem the page, get the SPLimitedWebPartManager like you would using the Object model, find the webpart and change the export mode.

0

You can also try exporting the site as a template and then unzip the wsp file. You should be able to find "AllUserWebpart" tag for the listview webpart in one of the elements file, which will contain the schema.

0

An option or bug in 2010 is:

  1. Insert a WP which has the export option on top of the List WP you like to export
  2. Go into edit mode for the List WP (with the little arrow)
  3. Click on the menue (with the little arrow) of the other WP and choose Export tata... the List WP will be exportet and not the WP you ve choosen the export function from.
0

What you also could do is open the page in SharePoint Designer, find the non exportable webpart and look for ExportControlledProperties="False". Change "False" to "True" and save the page. Go back to the page in the brwoser and you will see that the export option is now available.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.