09 September, 2010

SP2010: Exporting and Importing Web Parts

After you have properly configured a web part, including both common and unique properties, you may want to reuse the web part with the same settings in other sites or pages. SharePoint provides you with this capability by allowing you to export most web parts and import them into another site.

Exporting the web part creates an XML file with a .webpart or .dwp extension that contains the properties of the web part and the information SharePoint needs to duplicate its functionality. If the Export Mode web part property is set to the Non-sensitive Data Only option, the export will not include certain properties marked as sensitive information (such as passwords).

To export a web part, follow these steps:

1. On the page, click the Edit Page link in the Site Actions menu.
2. On the title bar of the web part you wish to export, open the Web Part Menu by
clicking the down arrow on the right.
3. On the Web Part Menu, click the Export... option.
4. On the File Download dialog box, click the Save button.
5. On the Save As dialog box, browse to the directory where you want the webpart file placed and click the Save button.

To use this exported web part (or any other .webpart or .dwp file provided to you by other users), you must import it into the site as a user with the Full Control permission level where you want to use the web part. You can import a web part in one of two ways. The first way to import the file prevents others from using the web part, but it must be done each time you want to add it to a page.

To import a web part using this method, follow these steps:

1. On the page, click the Edit Page link in the Site Actions menu.
2. On the page, select the Web Part command from the Web Parts group on the Editing Tools - Insert ribbon.
3. On the Web Parts bar, click the down arrow next to Upload a Web Part.
4. On the Upload a Web Part pane, click the Browse button.
5. On the Choose File dialog box, browse to the .webpart or .dwp file, select it, and click the Open button.
6. On the Add Web Parts pane, click the Upload button.
7. In the Categories section of the Web Parts bar, select the Imported Web Parts category and add the web part to the page

The other process used to import a web part file causes the web part to appear in the other categories available in the Web Parts bar. This is beneficial because other users can easily add instances of this imported web part by using the appropriate category, whereas the previous import method was a one-time-use scenario.

To import a web part using this method, follow these steps:

1. On the site, click the Site Settings link in the Site Actions menu.
2. If the site is not a top-level site, click the Go to Top Level Site Settings link
under the Site Collection Administration section.
3. On the Site Settings page, click the Web Parts link under the Galleries section.
4. On the Web Part Gallery page, select the Upload Document command from
the New group on the Library Tools - Document ribbon.
5. On the Upload Web Part window, click the Browse button.
6. On the Choose File dialog, browse to the .webpart or .dwp file, select it, and
click the Open button.
7. On the Upload Web Part window, click the OK button.
8. On the Edit Item window, edit the name, title, and description that were
loaded from the file. Select a Group and, optionally, any of the
Recommendation Settings to determine how the web part is organized and
presented to users on the Web Parts bar.
9. Click the Save button.

The Web Part Gallery page will refresh and contain your newly uploaded webpart in the list. The Web Part Gallery page also lets you edit, delete, and manage security for web partsusing the same familiar capabilities found in lists and libraries. The Edit Item window for a web part in the Web Part gallery contains an Export command in the Actions group on the Edit ribbon, allowing you to export the web parts as files for importing elsewhere.

Please let me know in case of any queries/questions,I hope the above information will helps you to understand the detailed know-how about export-import process of webparts..Thanks..


  1. I have a custom list datasheet view on my page and cannot see any export options for it, and even when I go to try and edit web part it attempts to open the editing dialog then immediately closes. Any ideas? Sharepoint 2010 and I do not have access to the SP server, it is a company intranet.

  2. okay. lets try one step by means of troubleshooting purpose.

    - open the site
    - site actions
    - edit page
    - try to add one more webpart and check the export option is available or not in that state.

    If you get the option for that webpart then check for the custom list webpart also.

    Please let me know in case of any issues, Thank you

  3. Hi Amol,

    I have a question. I don't want to set Recommendation Settings value manually after importing webpart. Can this change be done in .dwp file? Problem is, I have wsp which deploys webpart, so Recommendation Settings value is every time overwritten. Imagine if I have 100 webparts, I can not set Recommendation Settings manually every time after deploying my wsp solution.


  4. i think this can be possible by webpart adder.

    Web Part Adder (Microsoft.SharePoint.WebPartPages.WebPartAdder) is a new control available with SharePoint 2010 which is responsible for providing the list of Web Parts available for specific Web Part Zone. Since it’s scoped to a Page it provides you with great flexibility of choosing which Web Parts should be available where.

    pls let me know your thoughts on this

  5. Hi Amol,

    I have exported the Content editor webpart . I want to add a custom category for those exported webparts which can be visible under my category while adding webparts. Which node in the .dwp file should be edited to get the category ?


  6. Hi Amol,

    I have a quick question, I am able to import and export webparts, unfortunately once you uploaded a web part and tried to upload the same one with changes, I can see the old webpart as well, can you tell me how can i get rid of those old uploaded ones. I have tried in sits / settings / gallery / webparts.. I haven't found any uploaded webparts there.............. any thoughs will avoid much confusion.

    Thanks Murali


Your feedback is always appreciated. I will try to reply to your queries as soon as possible- Amol Ghuge

Note: Only a member of this blog may post a comment.