Use Case

Estimated reading: 2 minutes 1840 views

The user receives a CSV file to which they need to append data. The data will be extracted from the website using the “HTMLTableToDataTable” activity. Once the data has been appended, we will read the CSV file using the “ReadCSV” activity to verify that the data has been successfully appended.

Here’s how we can achieve the task,

1. Drag and drop the “OpenWebBrowser” activity into the workflow and set it as start node.
a. Here we are using this activity to open the website to extract the datatable.
b. In this case, let’s use a sample website “https://datatables.net/examples/styling/bootstrap4”. 
c. Double click on the activity and provide the above URL in the “URL” property. 

2. Now, Add the “HtmlTabletoDatatable” activity next to the “OpenWebBrowser”.
a. Here we are using this activity to extract the data in a tabular format from the website and return the output in “Datatable” datatype.   
b. Double click on the activity and choose the “Select Element” option to spy the table value from the website. Click here to refer
c. Next move to the “Datatable” in the properties to view the output of the activity.
d. Refer the steps here to learn how to declare a variable in Datatable format.

3. Add the “AppendCSV” activity next to the “ExceltoDatatable” activity.
a. Here we are using this activity to append the converted excel data into the CSV file.
b. I have already created a CSV file to write the input data.
c. Double click on the activity and click on the “Browse file” option to choose the CSV file.
d. Navigate to the “AppendData” to provide the input datatable that has been extracted from the website.
e. Here the variable is “DT”. 

4. Now, add the “Read” activity from the CSV Automation and place it next to the “Append” activity
a. Here we are using this activity to read the CSV data from the existing file.
b. Double click on the activity and provide the “FilePath”. 
c. In this case, we are using the CSV file where we have appended the data.
d. Navigate to the “ReadData” in the output properties panel to declare a variable to view the output in tabular format.
e. Here we are declaring the variable as “RD_CSV”. 

5. Now, you can add the “Tableviewer” activity to view the output for the read data from CSV file.

Share this Doc

Use Case

Or copy link

CONTENTS