Applies To
SharePoint On-Premises and SharePoint Online
Description
This article lists the fixes for common issues in Excel to SharePoint tool
- Missing SharePoint dependency Dlls
- Authentication issue for O365 tenancy
- Multifactor authentication for the SharePoint site
- Duplicate columns in the excel sheet
- Excel tool crashes on clicking Load button
1.Missing SharePoint dependency Dlls
Error 1 Details
“System.NotSupportException” error message appears in the “Excel to SharePoint Import” tool on clicking the “Load” button. See screenshots section below.
Error 2 Details:
System.IO.FileNotFoundException: Could not load file or assembly ‘Microsoft.SharePoint.Client.Runtime, Version=15.0.0.0, Culture=neutral, PublicKeyToken=71e9bce111e9429c’ or one of its dependencies.
Cause
Missing dependency assembly files in the “Excel to SharePoint Import” tool package
Resolution
Please make sure that the dependency assembly files (Microsoft.SharePoint.Client.dll and Microsoft.SharePoint.Client.Runtime.dll) present in the same folder where the “Excel to SharePoint Tool” exists. Dependency assemblies are part of the package shared and they should present in the same folder where the tool present.
We can find the latest tool with dependency assembly file in below article:
https://www.crowcanyon.help/article/204/
2.Authentication issue for O365 tenancy
Error Details
“Cannot connect web site or the web sites does not support SharePoint Online Credentials” error message on clicking “Load” button. Log text box may show “System.ArgumentNullException” error message. See Screenshot below.
Cause
This error may occur if the new (Modern) authentication model is enabled for the site and the legacy authentication mode is disabled.
Resolution
Enable the Legacy authentication to the SharePoint Online site and retry.
To check which authentication model that is being used by the site, please follow below instructions:
Download and Install SharePoint Online Management Shell on your desktop.
Open “SharePoint Online Management Shell” as Administrator and run below commands one by one to understand whether legacy authentication is enabled or not (See sample screenshot in Screenshots section).
Connect-SPOService –Url “https://xxxxxx-admin.sharepoint.com”
$tenantSettings = Get-SPOTenant
$tenantSettings.LegacyAuthProtocolsEnabled
If the legacy authentication is disabled, we need to enable it to use our tool. To enable the legacy authentication mode, start “SharePoint Online Management Shell” as Administrator and run below commands one by one.
Connect-SPOService –Url “https://xxxxxx-admin.sharepoint.com”
$tenantSettings = Get-SPOTenant
$tenantSettings.LegacyAuthProtocolsEnabled
Set-SPOTenant -LegacyAuthProtocolsEnabled $true
Re open the SharePoint Management Shell and retry #2 and make sure the legacy authentication is enabled. See sample screenshot below
For more details on “LegacyAuthProtocolsEnabled”, please refer the article https://docs.microsoft.com/en-us/powershell/module/sharepoint-online/set-spotenant?view=sharepoint-ps
3.Multi factor authentication for SharePoint site
Error Details
Excel To SharePoint Tool doesn’t load the Target list related fields and results in an error “System.Net.WebException: The request failed with an empty response” in the log. See sample screenshot below
Cause
Multi-factor authentication is enabled for the SharePoint Site
Resolution
Please refer below link to Allow users to create app passwords to sign into non-browser applications and import the data again using app password in our tool.
4. Duplicate columns in the excel file
Exception details
System.ArgumentException: An item with the same key has already been added.
at System.ThrowHelper.ThrowArgumentException(ExceptionResource resource)
at System.Collections.Generic.Dictionary`2.Insert(TKey key, TValue value, Boolean add)
at CrowCanyon.ExcelToSharePointTool.Form1.ImportDataFromExcelFile(Dictionary`2 mappingFields, Dictionary`2 spFieldsAndTypes, String listName, String serverURL, String userName, String password, String[] titlesArray, String[,] valuesArray, OperationMode opMode)
at CrowCanyon.ExcelToSharePointTool.Form1.GenerateItemsThread()
Cause
Duplicate columns present in the excel file
Fix
Remove the duplicate column from excel sheet and re-run the Crow Canyon Excel to SharePoint import tool
5. Excel tool crashes on clicking Load button
Issue
On Clicking Load button in Excel, tool crashes with message: “CrowCanyon.ExcelToSharePointTool has stopped working”. Error image is shown below.
Cause
This can happen if the tool is blocked as it came from another computer/source to help protect the PC.
Resolution
Go to the folder where the excel tool binary is located. Right Click on Excel to SharePoint Tool (CrowCanyon.ExcelToSharePointTool.exe) –> Properties –> General Tab –> Unblock the tool and click on Apply.
After this step, run the Excel to SharePoint tool (run as Administrator) and it should work as expected.