HTMLTabletoDataTable

This activity helps in extracting the data table in HTML format from a webpage and then
converting it into a structured data table, which is a common format for manipulating
tabular data.

Technical Reference

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

INPUT

BrowserType:  Gets auto filled, once the element is indicated on the web page using Robility Spy. Here the browser type will be displayed.

BrowserVersion:  Gets auto filled, once the element is indicated on the web page using Robility Spy. Indicates the version of the browser in use.

ExecuteBy: Gets auto filled, once the element is indicated on the web page using Robility Spy. This contains the set of attributes for the specific spied element.

FirstRowAsHeader: It accepts Boolean value. True - Considers the first row as header.
False - Does not consider the first row as header.

FramePath: Gets auto filled, once the element is indicated on the web page using Robility Spy. The frame path is auto filled only if the selected element has a frame ID in the webpage.

URL: Gets auto filled, once the element is indicated on the web page using Robility Spy. Indicates the URL in which this activity is performed.

WaitForReady:  Runs the activity once the webpage loading matches the wait for ready state.

None – It will perform the activity functionality without checking the state of the browser.

Interactive- The activity will be performed once the web element is found even if the webpage is still in loading state.
Complete-  The activity will proceed to the next step only if the web page is completely loaded.

WaitTime:  It helps the user to add a delay to start the execution of the further activity. The format of the delay here is milliseconds. By default, it will be set to 30000. When the option is left blank, no delay is considered.

 

 

 

 

 

 

 

 

MISC

Display Name: Displays the name of the activity. The activity name can be customized which will help in troubleshooting.

SkipOnError: Specify the Boolean value as “True or False.”
True: Continues to execute the workflow irrespective of any error thrown.
False: Stops the workflow if it throws any error.
None: If the option is specified as blank, by default the activity will perform the “False” action.

Version: It specifies the version of the web automation feature in use

 

 

 

OUTPUT

DataTable: The HTML table extracted from the webpage is stored in this variable in a “datatable” datatypes. This can be used as an input in other activities.

Result: It helps to view the execution state of the activity. It returns the values in Boolean format.
True: It indicates that the activity has been executed successfully without any error.
False: It indicates that the activity has been unsuccessful due to some unexceptional error thrown.

* Represents mandatory fields to execute the workflow.

Use Case

The following activity illustrates how we can use this activity to extract an HTML table
from the webpage. In this example we are going to extract an HTML table from the
website https://www.w3schools.com/html/html_tables.asp, which is then entered into
an excel file.

Steps to execute the bot

1.      Open a project and create a workflow.

2.      Drag and drop the HTMLTabletoDataTable activity to the workflow.

3.      Double click on the activity and click on select element.

4.      Navigate to the browser page and spy over the element that needs to be extracted.

Click here to know how the variables are declared.
 

5.      Drag and drop a get excel object activity to the workflow.

6.      Mention the path of the excel file in which the details of the extracted datatable has
 to be inserted.

7.      Drop a write ranges activity from the excel automation feature within the get excel
 object scope.

8.      Mention the input as “details”, which is the variable in which the HTML table is stored
 in a datatable format.

9.      Enter the range of cells within which the data has to be entered. Here it is “A1:C7”

10.   Specify the sheet name in which the activity has to be performed. Here it is “Sheet1”

11.   Execute the activity.


            

The bot executes the activity, extracts the HTML table from the webpage and
enters the details stored in a datatable string into an excel file. Once the
activity is executed, we can open the excel file to see 
the extracted data there.