Skip to main content

Append Excel

Appends data from a sheet in one excel file to another excel file.

Common Properties

  • Name - The custom name of the node.
  • Color - The custom color of the node.
  • Delay Before (sec) - Waits in seconds before executing the node.
  • Delay After (sec) - Waits in seconds after executing node.
  • Continue On Error - Automation will continue regardless of any error. The default value is false.
info

If the ContinueOnError property is true, the automation will not catch any errors even if a Catch node is used.

Input

  • First File Descriptor - Descriptor of the first excel file.
  • First Sheet Name - Name of the sheet in the first excel file to append data from.
  • Second File Descriptor - Descriptor of the second excel file.
  • Second Sheet Name - Name of the sheet in the second excel file to append data to.
info

Excel File Descriptor is the output of the Open Excel node.

How It Works

  1. Validates Input: Checks that both file descriptors and sheet names are provided
  2. Sets Active Sheets: Activates cell A1 in both source and destination sheets
  3. Retrieves Handles: Gets the Excel file handles for both files
  4. Reads Headers: Reads the first row (column headers) from both sheets
  5. Validates Columns: Compares column headers to ensure they match exactly (same names in same order)
  6. Counts Rows: Determines the total number of rows in the destination sheet
  7. Copies Data: Iterates through all data rows in the source sheet (skipping the header) and appends them to the destination sheet starting after the last row
  8. Preserves Values: Each cell value is copied individually from source to destination

Requirements

  • Both Excel files must be opened using the Open Excel node first
  • Both sheets must have identical column headers (same names in same order)
  • Both sheets must exist in their respective files
  • The files can be either .xlsx or .xls format

Error Handling

Error CodeDescriptionSolution
Core.Excel.Append.ErrOnCreateConfiguration parsing failedCheck node configuration is valid
Core.Excel.Append.ErrOnMessageMessage parsing failedVerify input message format
Core.Excel.Append.ErrFileDescriptorFile descriptor is empty or file not foundEnsure both files are opened with Open Excel node
Core.Excel.Append.ErrSheetNameSheet name is emptyProvide valid sheet names for both files
Core.Excel.Append.ErrSetActiveCellFailed to set active cellCheck sheet exists and is accessible
Core.Excel.Append.ErrGetRowsFailed to retrieve rowsVerify sheet has valid data
Core.Excel.Append.ErrGetColumnsFailed to retrieve columnsEnsure sheet has at least one row
Core.Excel.Append.ErrDifferentColumnsColumn headers don't matchEnsure both sheets have identical headers

Usage Examples

Example 1: Append Monthly Sales Data

Combine monthly sales reports into a master file:

- Open Excel (master_sales.xlsx) -> masterFD
- Open Excel (january_sales.xlsx) -> janFD
- Append Excel:
- First File Descriptor: janFD
- First Sheet Name: "Sales"
- Second File Descriptor: masterFD
- Second Sheet Name: "AllSales"
- Save Excel (masterFD)
- Close Excel (both files)

Example 2: Consolidate Regional Reports

Merge data from multiple regional offices:

- Open Excel (consolidated.xlsx) -> mainFD
- For each region in ["North", "South", "East", "West"]:
- Open Excel ({{region}}_report.xlsx) -> regionFD
- Append Excel:
- First File Descriptor: regionFD
- First Sheet Name: "Data"
- Second File Descriptor: mainFD
- Second Sheet Name: "AllRegions"
- Close Excel (regionFD)
- Save Excel (mainFD)
- Close Excel (mainFD)

Example 3: Combine Daily Logs

Append today's log to historical archive:

- Open Excel (archive.xlsx) -> archiveFD
- Open Excel (today_log.xlsx) -> todayFD
- Append Excel:
- First File Descriptor: todayFD
- First Sheet Name: "Sheet1"
- Second File Descriptor: archiveFD
- Second Sheet Name: "Historical"
- Save Excel (archiveFD)

Usage Notes

  • The operation appends data from the first file to the second file (first file remains unchanged)
  • Column headers must match exactly - both the names and the order
  • Only data rows are copied; the header row from the source sheet is not duplicated
  • The node automatically handles finding the last row in the destination sheet
  • Cell formatting is not copied, only values
  • Formulas are converted to their calculated values during the append operation

Tips

  • Always validate that your source and destination sheets have matching columns before appending
  • Use Get Sheets to verify sheet names exist before appending
  • Consider creating a backup of the destination file before large append operations
  • For better performance with large datasets, ensure the Excel files are on local storage
  • Remember to save the destination file after appending to persist the changes
  • Close files when done to free system resources