Save and Close Activity
The Save and Close activity manages the state of an Excel file after operations are completed. It enables users to save, close, or perform both actions on an active Excel workbook. This activity ensures data persistence and proper resource management for Excel files within a workflow.
| Field | Description | Requirement |
|---|---|---|
| Excel name | Specifies the reference name of the Excel file that has been previously opened or created. | Required |
| Action | Selects the desired operation to perform: SAVE, CLOSE, or SAVE_AND_CLOSE. | Required |
| Excel file name | Defines the full path and name if saving the Excel file to a new location or with a different name (Save As). | Optional |
| New password | Sets a password to protect the Excel file upon saving. This applies when creating a new file or using Save As. | Optional |
Action Types & Examples
SAVE
- Format:
string - Example Result: Saves changes to the current instance or a new path if specified.
CLOSE
- Format:
string - Example Result: Terminals the Excel instance without saving pending changes.
SAVE_AND_CLOSE
- Format:
string - Example Result: Commits all changes to the file and terminates the background process.
Implementation Examples
Field Setup
- Excel name:
OrderExport - Action:
SAVE - Excel file name:
C:\Reports\Daily_Order.xlsx - New password:
SecurePass123
Execution Parameters
- Excel Reference:
OrderExport - Action Performed: File is saved to the designated path and encrypted with the provided password.
Technical Notes
To save an Excel file to a new location or with a different name (Save As), the
Excel file nameparameter must be provided. If aNew passwordis defined, the resulting file will require this password to be opened in future sessions.