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
- Validates Input: Checks that both file descriptors and sheet names are provided
- Sets Active Sheets: Activates cell A1 in both source and destination sheets
- Retrieves Handles: Gets the Excel file handles for both files
- Reads Headers: Reads the first row (column headers) from both sheets
- Validates Columns: Compares column headers to ensure they match exactly (same names in same order)
- Counts Rows: Determines the total number of rows in the destination sheet
- 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
- 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 Code | Description | Solution |
|---|---|---|
| Core.Excel.Append.ErrOnCreate | Configuration parsing failed | Check node configuration is valid |
| Core.Excel.Append.ErrOnMessage | Message parsing failed | Verify input message format |
| Core.Excel.Append.ErrFileDescriptor | File descriptor is empty or file not found | Ensure both files are opened with Open Excel node |
| Core.Excel.Append.ErrSheetName | Sheet name is empty | Provide valid sheet names for both files |
| Core.Excel.Append.ErrSetActiveCell | Failed to set active cell | Check sheet exists and is accessible |
| Core.Excel.Append.ErrGetRows | Failed to retrieve rows | Verify sheet has valid data |
| Core.Excel.Append.ErrGetColumns | Failed to retrieve columns | Ensure sheet has at least one row |
| Core.Excel.Append.ErrDifferentColumns | Column headers don't match | Ensure 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
Related Nodes
- Open Excel - Required to get file descriptors
- Save Excel - Save changes after appending
- Close Excel - Close files when done
- Get Sheets - List available sheets
- Get Range - Alternative for copying specific ranges
- Set Range - Alternative for writing data ranges