Skip to content

Download Excel

Overview

Download an Excel file on the client, with the file content specified through variables

Parameter Configuration

ParameterDescription
File NameName of the file downloaded locally. Supports using expressions to specify dynamic content.
Worksheet ListData for the Sheet tabs downloaded locally

Worksheet List

ParameterDescription
Tab NameName of the Excel Sheet. Supports using expressions to specify dynamic content.
Data Source TypeData source type for the Excel Sheet. Supports List and HTML Table
Data SourceValue of the data source for the Excel Sheet. Supports using expressions to specify dynamic content
Header PropertiesWhen the data source type is List, you need to specify an array of data header property orders to read
Header NamesWhen the data source type is List, you need to specify an array of data header name orders to read

Notes

  • File Name: Must include the suffix after file output (.xlsx). File name cannot contain: ?[ ]/* symbols
  • Tab Name: Tab name must comply with Excel naming rules. Sheet name maximum 31 characters, cannot contain: ?[ ]/* symbols

Usage Instructions

  • When the data source type is HTML Table, you can fill in table tag content into the Data Source setting item, example:

    html
    <b>Table1</b><br />
    <table id="table2">
      <thead>
        <th>Column1</th>
        <th>Column2</th>
        <th>Column3</th>
      </thead>
      <tr>
        <td>A6</td>
        <td>B6</td>
        <td>C6</td>
      </tr>
      <tr>
        <td>A7</td>
        <td>B7</td>
        <td>C7</td>
      </tr>
    </table>
  • When the data source type is List:

    • Data Source needs to be set with list-type data
    • Header Properties are the object properties in the list elements of the Data Source
    • Header Names are the display text mappings for the Header Properties Example: Data Source
      text
      ${[
         { "name": "test1", "age": 14 },
         { "name": "test2", "age": 22 },
         { "name": "test3", "age": 50 }
      ]}
      Header Properties
      javascript
      ${["name","age"]}
      Header Names
      javascript
      ${["Name","Age"]}

Usage Scenarios

  • Based on client calls, build data lists that meet conditions and download Excel to the client locally
  • Based on client calls, build personalized HTML tables and download Excel to the client locally