Save Excel
Saves an Excel file to the specified location.
info
The changes to the Excel file are only applied if the Save Excel node is executed.
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, no error is caught when the project is executed, even if a Catch node is used.
Input
- Excel File Descriptor - The ID of the Excel file to be saved. This ID is generated by the Open Excel or the Create Excel node.
- Save File Path - The path where the Excel file will be saved.
How It Works
- Validates Input: Checks that the file descriptor is provided and not empty
- Retrieves Handle: Gets the Excel file handle from the descriptor
- Updates Linked Values: Refreshes any linked values or formulas in the workbook
- Determines Save Path: If Save File Path is provided, uses it; otherwise saves to original file location
- Saves File: Writes the Excel file to disk at the specified or original location
- Persists Changes: All modifications made to the file are written to disk
Requirements
- The Excel file must be opened with Open Excel or created with Create Excel
- A valid file descriptor must be provided
- Write permissions are required for the target directory
- If saving to a new location, the directory must exist
Error Handling
| Error Code | Description | Solution |
|---|---|---|
| Core.Excel.Save.ErrOnCreate | Configuration parsing failed | Check node configuration is valid |
| Core.Excel.Save.ErrOnMessage | Message parsing failed | Verify input message format |
| Core.Excel.Save.ErrFileDescriptor | File descriptor is empty or file not found | Ensure file is opened/created before saving |
| Core.Excel.Save.ErrUpdate | Failed to update linked values | Check workbook formulas and links are valid |
| Core.Excel.Save.ErrSave | Failed to save file | Verify write permissions and disk space |
Usage Examples
Example 1: Save to Original Location
Save changes back to the original file:
- Open Excel (data.xlsx) -> fileDesc
- Set Cell Value (fileDesc, "A1", "Updated Value")
- Save Excel:
- Excel File Descriptor: fileDesc
- Save File Path: "" (leave empty)
- Close Excel (fileDesc)
Example 2: Save As New File
Save to a different location with a new name:
- Open Excel (template.xlsx) -> fileDesc
- Set Range (fileDesc, "A1:C10", {{processedData}})
- Save Excel:
- Excel File Descriptor: fileDesc
- Save File Path: "Reports/generated_report.xlsx"
- Close Excel (fileDesc)
Example 3: Create and Save New File
Create a new file and save it:
- Create Excel -> newFile
- Set Range (newFile, "A1:B1", ["Name", "Email"])
- Set Range (newFile, "A2:B2", ["John Doe", "john@example.com"])
- Save Excel:
- Excel File Descriptor: newFile
- Save File Path: "Output/contacts.xlsx"
- Close Excel (newFile)
Example 4: Save with Dynamic Filename
Save with timestamp in filename:
- Get Current Date -> now
- Format Date (now, "yyyy-MM-dd_HHmmss") -> timestamp
- Open Excel (report.xlsx) -> fileDesc
- Set Cell Value (fileDesc, "A1", {{timestamp}})
- Save Excel:
- Excel File Descriptor: fileDesc
- Save File Path: "Archive/report_{{timestamp}}.xlsx"
- Close Excel (fileDesc)
Usage Notes
- If Save File Path is empty, the file is saved to its original location (where it was opened from)
- If Save File Path is provided, the file is saved to that new location (Save As)
- Saving does not close the file - you can continue working with it after saving
- All changes are only persisted when Save Excel is executed
- The node updates linked values and formulas before saving
- You can save multiple times to different locations without reopening the file
- Original file remains unchanged if you use Save As with a different path
- File descriptor remains valid after saving
Tips
- Always save before closing to persist your changes
- Use empty Save File Path to update the original file
- Provide a Save File Path to create a backup or new version
- Save periodically during long automation processes to avoid data loss
- Use dynamic filenames with timestamps for archiving or versioning
- Verify the target directory exists before saving to a new location
- Consider saving to a temporary location first, then moving to final destination
- Use Save As to preserve the original file while creating modified versions
Related Nodes
- Open Excel - Open an Excel file
- Create Excel - Create a new Excel file
- Close Excel - Close file after saving
- Set Range - Modify data before saving
- Set Cell Value - Update cells before saving