Showing posts with label Export-Import Webparts. Show all posts
Showing posts with label Export-Import Webparts. Show all posts

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..