Skip to main content

Export to Excel

Creates Excel files from workflow data.

Overview​

The Export to Excel node generates .xlsx files from your data. Use it to:

  • Create reports from processed data
  • Export data for external use
  • Generate formatted spreadsheets
  • Export existing Lido worksheets

Parameters​

ParameterDescriptionRequired
SourceData source typeYes
DataData to export (if source is Data)Conditional
Worksheet NamesWorksheets to export (if source is Spreadsheet)Conditional
Export FormulasInclude formulas instead of valuesNo
File NameName of the output fileYes
File DestinationWhere to save the fileYes
Lido Spreadsheet URLOverride the default spreadsheetNo

Source Options​

SourceDescription
DataExport data from the workflow
Spreadsheet WorksheetsExport existing Lido worksheets

Data Parameter​

When source is "Data", provide the data to export. The format determines the output:

Single worksheet (array of objects):

{{$item.data.rows}}

Multiple worksheets (object with worksheet names as keys):

{{
{
"Sheet1": $item.data.customers,
"Sheet2": $item.data.orders
}
}}

2D array:

{{$item.data.matrix}}

Worksheet Names​

When source is "Spreadsheet Worksheets", specify which worksheets to export as a JSON array:

["Sheet1", "Sheet2", "Summary"]

Export Formulas​

When enabled, cells containing formulas export the formula text instead of the calculated value. Useful for creating template files.

File Name​

Name for the output file. The .xlsx extension is added automatically if not included:

report
{{$item.data.reportDate}}_sales

Output​

The item passes through with file information added:

{
"file": {
"name": "report.xlsx",
"mimeType": "application/vnd.openxmlformats-officedocument.spreadsheetml.sheet",
"size": 12345
}
}

Examples​

Basic Data Export​

Export items to a single worksheet:

  1. Source: Data
  2. Data: {{[\$item]}} (wrap single item in array)
  3. File Name: export
  4. File Destination: Your Google Drive folder

Export Multiple Items​

Export all processed items:

[Import Table] → [Filter] → [Aggregate: COLLECT_ARRAY] → [Export to Excel]

Use Aggregate to collect items into an array, then export.

Multi-Sheet Export​

Export different data to multiple sheets:

  1. Source: Data
  2. Data:
    {{
    {
    "Customers": $item.data.customers,
    "Orders": $item.data.orders,
    "Summary": $item.data.summary
    }
    }}
  3. File Name: report

Export Lido Worksheets​

Export existing worksheets from your spreadsheet:

  1. Source: Spreadsheet Worksheets
  2. Worksheet Names: ["Dashboard", "Data"]
  3. File Name: backup

Daily Report with Date​

Include date in filename:

  • File Name: {{new Date().toISOString().split('T')[0]}}_daily_report

Produces: 2024-01-15_daily_report.xlsx

Email Report Attachment​

Export and email:

[Import Table] → [Aggregate] → [Export to Excel] → [Send Gmail]

Use the exported file as an attachment in Send Gmail.

Tips​

  • Use Aggregate with COLLECT_ARRAY to gather items before export
  • Object keys become worksheet names in multi-sheet export
  • Large datasets may take time to export
  • Connect to Send Gmail to email the exported file
  • Use expressions in File Name for dynamic naming