- Creates an Excel Instance with a unique name (User may decide instance name, but it should not be the default instance name)
- Opens an Excel workbook (either a blank or an existing file) that is visible while the automation is running.
- Saves a copy of the file with a different name in a separate folder (the user can decide which folder the file is saved to.)
- Closes the Excel Instance once the other commands have been completed.
Problem Difficulty: Very Easy
Solution will be provided on the next page with a brief explanation.
As a quick summary:
Step 1: The Create Excel Application command must be called first because it tells the automation that it needs to work with an Excel file instance. The variable created for the Excel Instance Name in the solution code was ‘vRenamingExercise’. The Visibility and Close Instances fields can both be set to yes. This command also allows the user to specify whether it will be opening an existing document or creating a new one and allows the developer to specify which file to open and its location in the event of the former.
Step 2: The Save Workbook As command will allow the specified Excel Instance to be saved with whatever the user designated as the name of the file in the specified file location.
Step 3: The Close Excel Application command will allow the specified Excel Instance to be closed as it is no longer needed. The Save Workbook field is set to No because the file has already been saved.