Step 1: To access an Excel file throughout the entire process, a global instance must be created first so that automation can be differentiated between different Excel windows (if multiple windows are created). The Create Excel Application command helps in performing this task.
- Select the Create Excel Application command.
- Enter Excel Instance Name. (This is the variable used to identify the Excel file opened by this command. The Excel Instance variable used for this guide will be vDeletingData.)
- For the New/Open Workbook field, select the “Open Workbook” option. (This will create an empty Workbook File Path field.)
- Enter the file path of the file that will be opened into the Workbook File Path field. (The file opened for this guide will be a test file that is located in the project folder alongside the Main.JSON and the project.config files. It will be displayed below. To ensure that a file can be found within the project folder no matter what computer/system the automation is run on, the {ProjectPath} file path is used.)
- Select the visibility criteria (Yes, to make the Excel window visible during process execution.)
- Select whether to close all existing Excel instances (User’s choice) (Yes is chosen to prevent any errors that may be caused by the file already being open when the automation is run multiple times.)
- Click OK