Refresh Data Connections

Estimated reading: 3 minutes

The Refresh Data Connections activity refreshes all supported data connections in an Excel workbook and waits for the refresh operation to complete before the workflow proceeds. This ensures that subsequent Excel activities use the latest available data.

Important: The Refresh Excel Data Connections activity can only be used inside the Use Excel File scope.

Prerequisites

1. A valid project must be configured in the Publish Console to publish workflows.
2. The activity must be placed inside a Use Excel File scope.
3. The workbook must contain supported data connections to refresh.
4. The user must have access to the data sources used by the workbook connections.

Activity Details in Canvas

The Refresh Excel Data Connections activity does not require any activity-specific configuration on the canvas. It automatically uses the workbook configured in the parent Use Excel File scope.

Do: Place the activity inside the Use Excel File scope. The activity refreshes all supported data connections and waits for the operation to complete before continuing to the next activity.

How the Activity Works

1. Identifies the supported data connections in the workbook.
2. Starts refreshing the available connections.
3. Waits for the refresh operation to complete.
4. Continues workflow execution after the refresh finishes successfully.

Example: If the workbook contains connections such as Sales_Data_Connection, Customer_Data_Connection, and Inventory_Report_Query, the activity refreshes all supported connections during a single execution.

Important: If the workbook does not contain any refreshable data connections, the activity completes successfully without modifying the workbook or generating an error.

Using the Activity within Use Excel File

Use Excel File
  ├─ Refresh Excel Data Connections
  ├─ Read Range
  └─ Write Cell

In this example, Read Range runs after the refresh operation completes, allowing it to access the updated workbook data.

Workbook State

The activity preserves the workbook structure and existing content, including:

a. Worksheets and formulas
b. Cell formatting
c. Charts and tables
d. Pivot tables
e. Named ranges

Only data affected by the connection refresh operation is updated.

Saving the refreshed data follows the configuration defined in the parent Use Excel File scope.

Error Handling

If a data connection cannot be refreshed, the activity fails and reports the connection and the reason for the failure.

Common causes include:

a. Authentication failures
b. Network connectivity issues
c. Database unavailability
d. API or service unavailability
e. Invalid connection configuration

Example Error:

Failed to refresh connection ‘SalesDatabase’. Reason: Unable to connect to the data source.

Properties

MISC

DisplayName: Specifies the display name of the activity. Customize it to improve workflow readability and troubleshooting.

SkipOnError: Specifies whether workflow execution continues when the activity encounters an error.
True: Continues workflow execution even if an error occurs.
False: Stops workflow execution when an error occurs.
None: Uses the default value, False.

Version: Displays the current version of the activity.

Output

Result: Returns a Boolean value indicating the execution status of the activity.
True: All supported data connections were refreshed successfully, or no refreshable connections were found.
False: The activity failed due to a connection refresh issue or an unexpected error.

Example

Consider an Excel workbook containing sales and inventory data imported from external data sources. Before processing the data, all supported connections must be refreshed.

Configure the Activity

1. Add a Use Excel File activity and select the required workbook.
2. Place the Refresh Excel Data Connections activity inside the Use Excel File scope.
3. Add the required Excel activities, such as Read Range or Write Cell, after the refresh activity.

Result

After execution, all supported data connections in the workbook are refreshed. Subsequent Excel activities can access the updated data, and the Result output returns True when the activity completes successfully.

Share this Doc

Refresh Data Connections

Or copy link

CONTENTS
Robility Chatbot
Robility Assistant
Online