Skip to main content

Close Excel

Closes an Excel file and releases the application resources. This node properly cleans up COM objects to prevent memory leaks.

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 the node.
  • Continue On Error - Automation will continue regardless of any error. The default value is false.
info

If ContinueOnError property is true, no error is caught when the project is executed even if the Catch node is used.

Input

  • File Descriptor - File descriptor of the Excel file to close. This is the identifier returned by the Open Excel node.

Output

This node has no output.

Options

This node has no additional options.

Example

Closing an Excel file:

// File Descriptor: message.excel_fd
// The Excel application instance is closed and resources are released

Complete workflow:

// 1. Open Excel
// Out File Descriptor: excel_fd

// 2. Perform operations...

// 3. Save Excel (if needed)
// File Descriptor: message.excel_fd

// 4. Close Excel
// File Descriptor: message.excel_fd

Tips

  • Always close Excel files when finished to free up system resources and prevent memory leaks.
  • Unsaved changes will be lost. Use Save Excel before closing if you want to keep changes.
  • After closing, the file descriptor becomes invalid and cannot be reused.
  • This node quits the Excel application instance, so all workbooks opened in that instance will be closed.

Common Errors

ErrorSolution
Invalid File DescriptorEnsure the Open Excel node was executed and the file descriptor is correct
File descriptor is nullCheck that the file descriptor variable contains a valid value
Excel instance not foundThe Excel instance may have already been closed