Download Training Materials
This example introduces you to the Automate Recorder and Excel actions. In this exercise you will read measurement data from the Excel worksheet into a dataset and then open a web page that contains a conversion utility to enter in the dataset values and extract the corresponding converted values, writing them back into the Excel worksheet. After completing this exercise, you will have learned to:
- Utilize the Automate Recorder to interact with web elements.
- Utilize the Excel actions to read data into a dataset.
- Utilize conditional logic to loop through the dataset.
- Write data into an existing excel document.
Using the Automate Recorder, open a web browser to a measurement conversion website. Use Automate to select the “From” measurement found in the Excel document and set the “From” value on the website. Use the Automate Recorder to then select the “To” measurement and get the converted “To” value writing it back into the worksheet. You will set the initial “From” value on the website to the "Inch" value from the Excel document. Find and extract the conversions for the following measurements: Foot, Yard, Mile.
- Create any required variables to store extracted values.
- Use the Excel Open Workbook and Get Cells actions to open and read the worksheet contents into a dataset.
- Access the Automate Recorder from the Task Builder by clicking on “New Recording”
- Utilize the Web button on the recorder to select the browser you would like to use and input the URL provided.
- Use the Web button on the recorder to set and extract the values.
- Use the Excel Set Cells action to write the extracted values into the worksheet.
- After recording the UI actions in the Automate Recorder you can inject business actions (Excel, conditional logic) directly into the recording region as needed.
- Utilize the Expression Builder to work with dataset and variable values.
- The Automate Window actions can be used to maximize browser windows.
- Web Browser actions can also be used in conjunction with the recorder actions, try this out to refresh the page between entries. Remember to update the session name.
- The OpenDocument Spreadsheet actions can be used if you do not have access to Excel.
Use best practices when creating any variable (var_variablename) or datasets (ds_datasetname) so you can easily recognize these objects.