Excel Services OData Integration with SharePoint

 

Excel Services data can be integrated codeless with native SharePoint lists using the Layer2 Business Data List Connector. Please take a look here for more supported systems and applications.​​ In case you are looking for Online data integration, you will find the right tool here.

 

​To retrieve Microsoft Office Excel data from SharePoint Excel Services, the data source entity must be configured as follows in the Layer2 Business List Data Connector:

 

bdlc excel odata

 

Fig. Example configuration to sync Excel Services OData data codeless with various other data sources.

Excel Services Specific Configuration Settings

 

First - Prepare the Excel file:

The Excel file itself must be properly configured to support this method. Follow these steps to prepare the file to be read by Excel Services.

 

  • Open the Excel file you wish to use and navigate to the sheet with your data.
  • Go to the Insert tab.
  • In the table, highlight the columns/rows that are to be read (including the headers).
  • Click the Table button to turn your selection into a table. In the resulting Create Table dialog, keep "My table has headers" checked and then click OK.
  • Note the name given to the table (should be listed in the Design tab) - you will need this for the "Collection=;" parameter in the connection string.
  • Save the Excel file, then upload the file to your SharePoint Documentation Library.

 

Second - Configure the List Connector Settings to connect:

 

  • ​Select the Layer2 Data Provider for OData to connect. The provider is part of the Layer2 Cloud Connector ADO.NET provider package and should be already installed. You will find the OData Provider specification here.
  • A valid connection string requires the same authentication parameters to access the SharePoint site the Excel file is stored on. It should look something like this: Url=https://MySharePointSite/_vti_bin/ExcelRest.aspx/MySubsite/MyDocLibrary/ExcelFile.xlsx/odata/;
    Collection=Table1; Authentication=Office365; user=myUser@myDomain.onmicrosoft.com; Password=myPassword
  • The "Collection=;" parameter will be the name of the table created in the steps above.
  • You can make use of OData to query your data as supported by the data provider and source system. For specification of supported queries see https://msdn.microsoft.com/EN-US/library/jj163211.aspx.
  • Please verify the select statement. Use the data preview to check out the result of your query.
  • Primary Key: Include a field with unique values in your query and use it as a "primary key" (unique column value) for synchronization.

Excel Services - Known Issues and Workarounds

 

  • An Excel table without any data in it beyond the headers will throw an error when you try validate the select statement (Layer2.Data.ODataRequestException). Make sure there is at least one row of data for the service to read.
  • There are other Excel features unsupported by the Excel Services. Please see https://msdn.microsoft.com/EN-US/library/ff595319.aspx and https://msdn.microsoft.com/EN-US/library/ff394477.aspx for more information.
  • Write-back does not appear to be supported. You can read but cannot write back to the Excel file with this method.
  • This feature may not be supported in BDLC prior to version 6.4.X.X.

Ready to go next steps?

Layer2 leading solutions product regsitration icon: a grey square with a big orange pen symbol.

Register for free download.

Keep your Sharepoint in sync. Download and try today.

Contact Us Icon for Layer2 leading solutions

Questions? Contact us.

We are here to help. Contact us and our consulting will be happy to answer your questions.