An SpsDev Featured Product:
PowerJAX Web Part
Tools for Microsoft SharePoint Technologies Users and Developers

SpsDev.Com's Import / Export Tool is new for Microsoft SharePoint 2007.  It allows you to select items within a site - from an entire list or document library, down to individual list items or documents - and export them from one list or site and then import them into another.  Along the way you have total control over how the data is moved around.

There are three main components to this application:

Exporting Data - Windows Application

The Import / Export Tool has a simple application interface to make it easy for you to select what items to export, and what options to use as part of that export.  You start by entering the Url to the site that contains the data from which you wish to perform the export.  When you click the List Object button, our Import / Export tool will quickly interrogate the site to find all of the lists and libraries within that site, along with all of the folders and items in each one as well. With a simple point and click interface, you select which of these items, or hierarchy of items that should be exported.

Select the items to export

Simply select the lists, folders, items, and/or documents that you want to export, tell us the filename to which the export should be saved and click the Export button - that's all there is too it.  We export not only the items, but also the metadata associated with those items. If you want some additional control during the export or import process though, you can have it.  Just click the Settings button to configure the details of your request:

Control your import and export settings

There are three kinds of settings - Common Settings, Export Settings and Import Settings.

Common Settings

Common settings include:

Export Settings

Export settings include:

Import Settings

Import settings include:

Importing Data - Windows Application

Importing data with the Import / Export Tool is just as easy as exporting.  Just tell us the name of the file that contains the exported information.  We'll crack it open and explore the contents so we know what's in it:

Import Dialog

Begin by entering the Url to the site into which you are going to import the contents in the Destination Site edit box.  If the export file contains list items or documents, you can optionally choose for each one the destination list or library into which they should be imported.  To map an item, click the Get Site Info button after you have entered the Destination Site Url.  It will query the SharePoint site and fill the Lists and Libraries drop down with all of the list, libraries and folders in the site.  You can check one or more items in the list of items to be imported, select the destination list, library or folder into which it should be imported, then click the Map Item button.  You can map different items to different destinations, and change existing mappings by selecting them, select the new destination, and clicking the Map Item button again.  If you want to start the mappings over again just click the Explore File button.

If you don't create a mapping for an item then we'll just try to import it into a list or library with the same name from which it was exported.  Once you've configured any import mappings just click the Import button and your data will be imported into the site you've specified in the Destination Site edit box.

Exporting Data - Admin Pages

After you have added and deployed the sdImportExportWeb.wsp solution, and activated the SpsDevImpExp feature, you will have two new menu items in the Site Administration section of the Site Settings page:

If you click on the Export Items link you will see a page that looks like this:

To begin the export process, click the Find Items button.  It will enumerate all of the lists, libraries, folders and items in the site.  It then displays the list of items and exposes the Export button, as shown in the picture below:

Select each item that should be exported by clicking the box next to the item's name.  If an item has a plus sign next to it, click it to expand the item and see all of the additional items that it contains.  Once you have selected all of the items for export you can fill in the export configuration Options.  The Options are:

After you have selected the items for export and provided all of the export configuration Options, click the Export button.  This may take a long time depending on how many items you are exporting.  If you select too much content, the operation in the Admin Pages may time out, and require you to use the Import / Export tool or a custom application that utilizes the sdImpExpData object to do the export.

If the export completes, successfully or otherwise, a message will be displayed near the top of the page that informs you whether it worked.  If it did work, it will also tell you the name of an Xml file that it created that will need to be used when you import the data from the export file that was just created.

Importing Data - Admin Pages

After you have exported data, you can use the Import Items page to import the data into a different list or library in the same site, or a different site altogether.  Begin by navigating to the site where you wish to import the data, and select the Site Settings...SpsDev.Com's Import Items menu.  It will display a page that looks like this:

Following are the import configuration options:

All of the Xml shown above is included in the file that is created at export time, except for the value in the ParentUrl attribute.  The ParentUrl attribute is where you enter the location into which the item should be placed when imported.  Please note that all locations must be in the same site collection - you can't map a single import to multiple site collections.  For individual items, enter the fully-qualified Url to a list or library.  For list or libraries, enter the fully-qualified Url to the site collection where the item should be imported. This field is required.

After you have provided all of the import configuration options, click the Import button.  This may take a long time depending on how many items you are exporting.  If you select too much content, the operation in the Admin Pages may time out, and require you to use the Import / Export tool or a custom application that utilizes the sdImpExpData object to do the import.

If the import completes, successfully or otherwise, a message will be displayed near the top of the page that informs you whether it worked.

Known Issues

During the course of our own testing we have found a number of issues or anomalies that you may also experience when using the tool.  These are not bugs in the product, but either nuances in the way the import / export features work in SharePoint, or bugs in the SharePoint import / export interfaces themselves.  We will keep a list up to date right here - please check these issues first before filing a bug report with SpsDev.Com.

Q: What if I want to import items into a site where there isn't a list or library with the same name as where items were exported, but I don't do a file mapping?

Q: What if the list or library I'm importing into doesn't contain the same metadata that the library I exported from had - will I lose the metadata?

Q: I get an error when I try to import a file that contains both list items and documents.

Q: When I do an export I get a Violation of PRIMARY KEY constraint error.

Q: When I do an export I get an error that says The formula refers to a column that does not exist. Check the formula for spelling mistakes or change the non-existing columns to an existing column.

Q: I export an item based on a custom content type, which includes site columns. When I do the import those site columns don't show up in the new site.

Q: I export an item based on a custom content type, which includes a workflow. When I do the import the workflow is no longer associated with my item.

Q: I export an item based on a custom content type, which includes a policy. When I do the import the policy is no longer associated with my item.

Q: I export an item based on a custom content type, which includes a custom document Information Panel. When I do the import the Information Panel tries to load from the location of the original item.

Q: I did an export that failed; now when I click on the navigation for the site it says "Error".

Q: I did an import and it says everything worked, but I can't find all my data - only part of it.  What happened?

Q: I exported data with custom metadata, but I don't see that metadata when I view the items after importing - what happened to it?

Q: My import failed with the following return code: Other. The error message returned was There was an error during import: The list item /Some%20Library/SomeFile.txt cannot be imported because its parent web does not exist. - what happened?

Q: I tried importing a file into a library and got this error: "There was an error during the import: one or more errors occurred - The specified name is already in use."