How to: Upload a Multi-Tab Excel Sheet

Prev Next

Certain configurations require uploading an Excel file to your application that contains multiple tabs. Let’s say you gathered data externally and want to process it using a Data Workflow. To process this data, you’ll use the Excel to JSON operator. Processing files with several tabs results in a different output compared to files with a single tab. The output will consist of a separate array for each tab present in your Excel file. It’s also important to note that the Excel to JSON operator only accepts the Base64, not the entire Excel file.

To complete the following configuration, you'll need a sample Excel file to upload. This configuration can accept any multi-tab Excel file you have available. The result you view in the DevTools Console might vary depending on the data you upload.

Configuration

In this how-to guide, you’ll upload a multi-tab Excel file to your application and process it using the Excel to JSON operator.

These instructions assume you have a new module open, saved with a title.

Configure the File Component

Begin by adding a File component to handle the file upload.

  1. In the Module Builder, drag and drop a File component onto your canvas.

  2. In the Property ID field, enter fileUploadTabs.

  3. In the Label Text field, enter Multiple Tabs Excel Upload.

  4. Click Save Component.

Configure the Data Workflow Component

Next, configure the Data Workflow. You'll include an Input operator to bring the data from your File component, and use a Get operator to retrieve the Base64 of your Excel file. Remember, the Excel to JSON operator only accepts the Base64, not the entire Excel file. From there, you'll pass that data to the Excel to JSON operator. Here, you'll set the multiTabExcel setting to Yes to process the mult-tab file. Lastly, you'll add a Console operator to view the output in the DevTools Console.

  1. Drag and drop a Data Workflow component onto your canvas, placing it below your Multiple Tabs Excel Upload File component.

  2. In the Property ID and Canvas Label Text fields, enter dwfExcelToJSONMultiTabs.

Configure the Input Operator

  1. Drag and drop an Input operator onto your Data Workflow canvas.

  2. Configure the operator's Info window as follows:

    Setting

    Value

    Category

    Input

    Component

    fileUploadTabs

    Required

    Yes

    Source

    Default

Configure the Get Operator

  1. Drag and drop a Get operator onto your Data Workflow canvas.

  2. Configure the operator's Info window as follows:

    Setting

    Value

    Category

    Get

    Label

    [0].data

    Path

    [0].data

  3. Connect the output port (right) of the fileUploadTabs Input operator to the input port (left) of the [0].data Get operator.

Configure the Excel to JSON Operator

  1. Drag and drop an Excel to JSON operator onto your Data Workflow canvas.

  2. Configure the operator's Info window as follows:

    Setting

    Value

    Category

    Excel to JSON

    Label

    Multiple Tabs

    mutliTabExcel

    Yes

  3. Connect the output port (right) of the [0].data Get operator to the input port (left) of the Multiple Tabs Excel to JSON operator.

Configure the Console Operator

  1. Drag and drop a Console operator onto your Data Workflow canvas.

  2. Configure the operator's Info window as follows:

    Setting

    Value

    Category

    Console

    Label

    Output

  3. Connect the output port (right) of the Multiple Tabs Excel to JSON operator to the input port (left) of the Output Console operatorA static image displaying the Data workflow configuration showing input, output, and conversion steps for Excel to JSON.

  4. Click Save Component.

Configure the Button Component

Lastly, configure a Button component to trigger your Data Workflow.

  1. Drag and drop a Button component onto your canvas, placing it between your Multiple Tabs Excel Upload File and dwfExcelToJSONMultiTabs Data Workflow components.

  2. In the Property ID field, enter btnExcelTabsToJSON.

  3. In the Label Text field, enter Multiple Tabs Excel to JSON.

  4. From the Action Type drop-down, select Event.

  5. From the On Click drop down, select dwfExcelToJSON.

    A static image displaying the Button component labeled 'Multiple Tabs Excel to JSON' with action triggers displayed below.

  6. Click Save Component.

  7. Save your module.

Here's how your completed module looks in the Module Builder:

A static image displaying the Module Builder configuration for uploading multiple Excel tabs and converting them to JSON format.

Preview your module in Express View and open the DevTools Console. Upload a multi-tab Excel file and click the Multiple Tabs Excel to JSON button. You'll see a new JSON object populate with the data from your Excel file. In the object, you'll see arrays for each tab in your Excel file. In the below example, you'll see data retrieved from an Excel file that includes three tabs: applicationIds, clientInfo, and organizations.

You'll get a different result depending on what data exists in your Excel file. Try uploading different Excel data to view the various outputs. From there, you can change settings in your Data Workflow to retrieve the output you want. Once you have the JSON data you need, you can pass it to another process.

Certain configurations require uploading an Excel file to your application that contains multiple tabs. Let’s say you gathered data externally and want to process it using a Data Workflow. To process this data, you’ll use the Excel to JSON operator. Processing files with several tabs results in a different output compared to files with a single tab. The output will consist of a separate array for each tab present in your Excel file. It’s also important to note that the Excel to JSON operator only accepts the Base64, not the entire Excel file.

To complete the following configuration, you'll need a sample Excel file to upload. This configuration can accept any multi-tab Excel file you have available. The result you view in the DevTools Console might vary depending on the data you upload.

Configuration

In this how-to guide, you’ll upload a multi-tab Excel file to your application and process it using the Excel to JSON operator.

These instructions assume you have a new module open, saved with a title.

Configure the File Component

Begin by adding a File component to handle the file upload.

  1. In the Module Builder, drag and drop a File component onto your canvas.

  2. In the Property ID field, enter fileUploadTabs.

  3. In the Label Text field, enter Multiple Tabs Excel Upload.

  4. Click Save.

Configure the Data Workflow Component

Next, configure the Data Workflow. You'll include an Input operator to bring the data from your File component, and use a Get operator to retrieve the Base64 of your Excel file. Remember, the Excel to JSON operator only accepts the Base64, not the entire Excel file. From there, you'll pass that data to the Excel to JSON operator. Here, you'll set the multiTabExcel setting to Yes to process the mult-tab file. Lastly, you'll add a Console operator to view the output in the DevTools Console.

  1. Drag and drop a Data Workflow component onto your canvas, placing it below your Multiple Tabs Excel Upload File component.

  2. In the Canvas Label Text and Property Name fields, enter dwfExcelToJSONMultiTabs.

Configure the Input Operator

  1. Drag and drop an Input operator onto your Data Workflow canvas.

  2. Configure the operator's Info window as follows:

    Setting

    Value

    Category

    Input

    Component

    fileUploadTabs

    Required

    Yes

    Source

    Default

Configure the Get Operator

  1. Drag and drop a Get operator onto your Data Workflow canvas.

  2. Configure the operator's Info window as follows:

    Setting

    Value

    Category

    Get

    Label

    [0].data

    Path

    [0].data

  3. Connect the output port (right) of the fileUploadTabs Input operator to the input port (left) of the [0].data Get operator.

Configure the Excel to JSON Operator

  1. Drag and drop an Excel to JSON operator onto your Data Workflow canvas.

  2. Configure the operator's Info window as follows:

    Setting

    Value

    Category

    Excel to JSON

    Label

    Multiple Tabs

    mutliTabExcel

    Yes

  3. Connect the output port (right) of the [0].data Get operator to the input port (left) of the Multiple Tabs Excel to JSON operator.

Configure the Console Operator

  1. Drag and drop a Console operator onto your Data Workflow canvas.

  2. Configure the operator's Info window as follows:

    Setting

    Value

    Category

    Console

    Label

    Output

  3. Connect the output port (right) of the Multiple Tabs Excel to JSON operator to the input port (left) of the Output Console operator.

    A static image displaying the Data workflow configuration showing steps to convert Excel to JSON format.

  4. Click Save.

Configure the Button Component

Lastly, configure a Button component to trigger your Data Workflow.

  1. Drag and drop a Button component onto your canvas, placing it between your Multiple Tabs Excel Upload File and dwfExcelToJSONMultiTabs Data Workflow component.

  2. In the Property ID field, enter btnExcelTabsToJSON.

  3. In the Label Text field, enter Multiple Tabs Excel to JSON.

  4. Set the Action Type as Event.

  5. From the On Click drop-down, select dwfExcelToJSON.

    A static image displaying the Button configuration for converting multiple Excel tabs into JSON format with event triggers.

  6. Click Save & Close.

  7. Save your module.

Here's how your completed module looks in the Module Builder:

A static image displaying the Module Builder configuration for uploading multiple Excel tabs to convert them into JSON format.

Preview your module in Express View and open the DevTools Console. Upload a multi-tab Excel file and click the Multiple Tabs Excel to JSON button. You'll see a new JSON object populate with the data from your Excel file. In the object, you'll see arrays for each tab in your Excel file. In the below example, you'll see data retrieved from an Excel file that includes three tabs: applicationIds, clientInfo, and organizations.

You'll get a different result depending on what data exists in your Excel file. Try uploading different Excel data to view the various outputs. From there, you can change settings in your Data Workflow to retrieve the output you want. Once you have the JSON data you need, you can pass it to another process.