Example: Extracting data from Excel to a web form
- Zuletzt aktualisiert2020/05/13
Example: Extracting data from Excel to a web form
Transfer data from the Excel spreadsheet to a web form using the Excel, Loop, Object Cloning, and Web Recorder commands.
Procedure
-
Open the web form:
- In the Web Recorder submenu, double-click or drag the Open Browser command.
- Type the URL to Open and click Save.
-
Add a wait time for the browser to open to the web page:
- Double-click or drag the Wait command.
- Select the Wait for windowoption button.
- From the drop-down menu, select the Window.
- Type the wait time and click Save.
-
Open the spreadsheet with the data:
- In the Excel submenu, double-click or drag the Open Spreadsheet command.
- Click Browse to select the Excel file.
- Click Contains Header, then click Save. This action excludes the header data from the first row.
- Double-click or drag the Get Cells command.
- Click Get All Cells and click Save.
-
Create a loop to iterate through each row of the spreadsheet:
- In the Loop submenu, double-click or drag the Each row in an Excel dataset command.
-
Click Save. A comment appears under the
Start Loop
action line.
-
Capture the web form fields as objects to manipulate their contents:
- Double-click or drag the Object Cloning after Comment command.
- From the drop-down menu, select the window.
- Click Capture and hold until the web page appears.
- Position the mouse over the field and then release the mouse. The Object Cloning window appears.
- From the Action To Perform drop-down menu, select Set Text.
- Click the Text To Set entry box.
- Press F2. The Insert Variable window appears.
- Select Excel Column, and click Insert. The Excel Column Option window appears.
- Type the Column Number, and click OK.
- Click Save.
- Repeat the above steps to capture each web form field as an object and assign it to an Excel column.
-
Automate clicking the Submit button in the web
form:
- Double-click or drag the Object Cloning after Comment command.
- From the drop-down menu, select the window.
- Click Capture and hold until the web page appears.
- Position the mouse over the Submit button and then release the mouse.
- The Object Cloning window appears.
- From the Action To Perform drop-down menu, select Left Click.
- Click Save.
-
When the Submit button is clicked, the web form
sends the data to a server to process and generate a success message. Insert a
Delay command to account for the processing
time:
- Double-click or drag the Delay command. The Delay window appears.
- Select the Regular Delayoption button and set the field to 5 seconds.
- Click Save.
-
When the web page redirects to the success message, navigate to the web
form:
- In the Web Recorder submenu, double-click or drag the Navigate URL command.
- Type the URL to Open and click Save.
-
Close the browser after the End Loop command and save
the Task to end the Task Bot Logic.
- Double-click or drag the Close Spreadsheet command and click Save.
- Name the Task and click Save.
- Click Run.