Symptoms
When migrating items using Excel, the following message is displayed:
The absolute URL '<URL>' was found in the 'DestinationPath' column of the Excel file. This column only accepts relative URLs.
or
The absolute URL '<URL>' was found in the 'SourcePath' column of the Excel file. This column only accepts relative URLs.
Error code
- DA-059-271
Any error code ending with: -271
Details
When using Excel to migrate items, there is a column DestinationPath. The path entered in this column must be relative to the destination list. In previous versions of Sharegate, a single column, SourcePath, was used to represent the location of the item both at the source and the destination. For these older Excel files, the issue would be found inside the SourcePath column.
Here is an example that shows the difference between the types of paths.
Absolute path: https://yoursite.sharepoint.com/sites/home/Folder/document.docx
Relative path: Folder/document.docx
As you can see, the absolute path contains the full path to the document, but the relative path contains just the path starting from the root of the list or library. Here is another example.
1. The relative path for this folder would simply be Sharegate/. The trailing slash is important since it defines that this is a folder. Any documents contained in this folder would have a path like Sharegate/document.docx. Another folder in the Sharegate folder would look like this : Sharegate/Folder1/
2. The relative path for this document would simply be test.xlsx.
Solution
To fix this, simply open the Excel document that you are using to migrate, locate the DestinationPath or SourcePath column and strip all paths so that they are relative to the list or library like explained in the details section of this article.