Connectors

Importing Documents and Metadata into a SharePoint Document Library

This guide will walk you through how to import documents and their corresponding metadata into a new SharePoint document library. This guide assumes that you have a file directory containing your documents to be added and the metadata is contained in an excel spreadsheet.

Files can be contained within folders, these folders will be added to SharePoint. For more information on changing file paths in SharePoint please see our SharePoint Folders page.

You can also bulk upload documents and folders into SharePoint straight from Excel. The guide on how to do this can be seen here.

Preparation

Before you begin following through this guide you need to make sure you have the data prepared and together.

Documents to be Uploaded

The screen capture below shows a directory of Word Documents that we will be moving into a SharePoint Document Library.

Files to be uploaded

Metadata Spreadsheet

We also have an Excel Spreadsheet with sample metadata that we want to add to the documents in the library during the upload. The document maps FileName to the actual Filename of the Word Document in the directory.

Excel metadata

Document Library in SharePoint

Finally, within SharePoint we have created an empty document library with the metadata columns already pre-defined.

SharePoint final Destination

Connect to the File System

To configure this project we first need to connect to our source. In this example it is the file directory on our machine.

Click on Connect Datasource in the Datasource A window and choose the File System > Files provider. Locate the folder that contains your documents by clicking on the ellipsis (...) in the Path field. Once you have done so, click Connect to load the data source.

Connect to File System

Connect to the Document Library

Now we need to connect the target to our document library in SharePoint. As we are using SharePoint online in this example, choose the SharePoint Online Provider from the connection menu. Enter the site URL and your credentials.

Connect to SharePoint

You will then be able to choose the document Library from the drop down menu in the ListName field.

Select Documentation Library

Once you have done this click Connect & Create Library Connection to save your connection to the connection library. Doing this opens up the connection library window where you are asked to type in a name for your connection. Click OK once you have typed in a title.

Choice to create and save connection

Data Sync's automatic mapping rule system will prompt you to select a rule to apply, press Apply to apply this rule.

Data Sync Automatic Mapping Rule

Now at this point, Data Sync is configured to import the documents to SharePoint. However, as we want to add the metadata we have one more step to go.

Configured Migration

Add the Metadata

Select the FullFileName column in Data Source A and press the Add Lookup button in the data source toolbar to create a Lookup.

Add Lookup

This will open up the connection window. Find and select the Excel Provider (OpenXML Excel Spreadsheet) and locate the excel spreadsheet you wish to be used in your lookup by clicking on the ellipsis (...) in the FileName field. In this case it is our metadata document.

Connect to Excel

Now we need to configure the lookup. For this example choose FileName as the target column. Select FileName from the drop down menu so that Data Sync matches based on the filename in the Excel file.

Configure Lookup

Now you can setup the Schema Map, so that the custom metadata columns from the Lookup map across to the SharePoint Columns.

Schema Map Setup

Press the 'Compare A -> B' Button in the Toolbar to compare the source to the Target.

Compare A-B

Data Sync will then display the results of the comparison. You can confirm that these are correct before synchronising by clicking onto the + 5 Record(s) Only in Source (A) ADD (5) to Target (B).

Comparison Results

Click Synchronise and then Start to begin the sync.

Synchronise

Once this has run through and completed, you can now go to your document library in SharePoint and view the documents that have been added, alongside their corresponding metadata.

Completed Data Sync

Completed Migration

Can't find the answers you're looking for? Contact our support team and we'll personally get back to you as quickly as we can.