Managing connection data centrally in an Excel file

Prev Next

Create a connection file in Excel to store all information that is needed to ensure a connection to SharePoint, D365 FSCM, D365 BC, D365 CE | Dataverse, SAP or any other environments that require an external authentication.

The advantage of such a connection file is that you can manage your connection data centrally and use it across data sources.

Steps

Creating the connection file

  1. Create a new Excel file named Connection.xlsx in your document template folder.

    File directory showing various document folders and an Excel file named Connection.

    Connection file in Test folder

  2. If you want to connect to a system that is not using Entra ID authentication, set up the connection with the following columns:

    • URL: e.g., SAP URL or D365 on-prem URL

    • Username: This should be a service user

    • Password: password (we recommend encrypting it via Crypto Data Source)

    Important

    Username and Password have been deprecated for D365 and SharePoint online connections.

    If you need to connect to your D365 systems or SharePoint Online, please enter the information from your Entra ID App Registration.

    For more information see Using a Microsoft Excel config file for the Add-In’s Microsoft Entra ID configuration.

    • Optional: Create any other columns that are needed to ensure a connection to your system.

  3. Save the file.

Adding the connection file to a data map

To enable your data map to access the contents of the connection file, you must link the file to the data map via an Excel data source.

  1. In Microsoft Word, Excel or PowerPoint, go to the dox42 ribbon and select Data Map.

    Toolbar displaying various functions like Generate, Data Map, and Refresh Template options.

    dox42 ribbon in Microsoft Word

    The Data Map Designer window opens.

    Data Map Designer interface showing various data source options for integration.

    Data Map Designer window

  2. Select the Excel data source.
    The Excel window opens.

    Excel data source initialization window with fields for name and file selection.

    Excel window

  3. On the Data Source tab, select Pick Excel file to choose the file you have just created.

  4. In the File text field, dynamise the path of the connection file by using the <%DocPath%> variable.
    Example: <%DocPath%>..\Connection.xlsx

    Excel data source configuration with fields for name, culture, and file path.

    Excel window with configuration

    Note

    The ..\ tells the system to look a level above in the folder structure and there it will find an Excel file named Connection.xlsx. Using <%DocPath%> makes it possible to copy the data map and insert it to another template folder without the need of changing the path.

  5. Go to the Data Source Output tab.

  6. Select the First Row of selected Range contains Column Names checkbox.

    Excel data source output settings with options for data range and field types.

    Data Source Output tab in Excel window

  7. Select the … button to select the fields from the Excel file.
    The Excel file opens.

  8. Mark the area with all the data.
    It is sufficient to only mark the header row.

    Excel interface showing SharePointSite and D365URL in a spreadsheet format.

    Excel file with marked data

  9. Close the Excel file.
    The data that has been marked will be taken over in the Data Range field.

  10. Select the Read until first empty cell checkbox for one of the fields.
    By selecting this checkbox, you make sure that all data rows are included, even if your Excel data source contains various rows. It is important to select the checkbox for a field that contains values in every row, e.g., an ID field.

    Excel data source output settings with highlighted fields for configuration.

    Excel window

  11. Select the OK button.
    A new Excel data source has been added.

  12. Select Save.

Result

You have created a connection file and connected your data map to it.

© dox42 2026. All rights reserved.