Examples

The following examples can be found on this page:

File Path

This example Data Stream demonstrates how to use this Action Agent to process new Excel files detected in a file directory.

Refer to configuration to understand all configuration options of this Agent.

Step 1: Add the Agent

Drag the Excel File Reader onto the canvas. Link the input endpoint to the Check for Files Listener and the output to the Write to SQL Server Agent. Save the Data Stream.

Step 2: Configure the Input Map

Select the input link and click Configure, then set the FilePath mapping to Path. Apply the changes.

Step 3: Configure General

Select the Agent and click Configure. In this case, keep the default Collection.

Step 4: Configure File Properties

Enter the worksheet Name and property definition. In this case:

  • Leave the worksheet name blank to use the first one.

  • Tick Use File Definition and upload the PumpData.xlsx file as the definition file.

  • Leave PumpId's field type as String.

  • Set Temperature's field type to Double.

Step 5: Results

Apply the changes and save the Data Stream.

Publish the Data Stream and open the Live Data View. Move or copy the PumpData.xlsx file into the file directory monitored by the Check for Files Agent. Observe that the PumpData file's rows are printed.

Files

See the Import, Export, and Clone - XMPro article for steps to import a Data Stream.

Streaming

This example Data Stream demonstrates how to use this Action Agent to process new Excel files from email attachments.

Refer to configuration to understand all configuration options of this Agent.

Step 1: Add the Agent

Drag the Excel File Reader onto the canvas. Link the input endpoint to the Get Email Listener and the output to the Event Printer Action Agent. Rename the Agent and save the Data Stream.

Step 2: Configure General

Select the Agent and click Configure. In this case, keep the default Collection.

Step 3: Configure File Properties

Enter the worksheet Name and property definition. In this case:

  • Leave the worksheet name blank to use the first one.

  • Tick Use File Definition and upload the EngineTemperature.xlsx file as the definition file.

  • Set Timestamp's field type to DateTime.

  • Set Temperature's field type to Double.

Apply the changes and save the Data Stream.

Step 4: Input Mapping

Select the Excel File Reader's input arrow and click Configure. Map one of the parent Agent's output attributes to the FileContent mapping. In this case, use AttachmentFileContent.

Apply the changes and save the Data Stream.

Step 5: Results

Publish the Data Stream and open the Live Data View. Send an email to the email address configured in Email Listener with EngineTemperature.xlsx as an attachment. Observe that an event per row in the Excel file is printed.

Files

See the Import, Export, and Clone - XMPro article for steps to import a Data Stream.

Last updated