Data extraction from web page to write range

what is the syntax for adding all the values which i am getting from get text activity in write range .?

1 Like

@Samm you can use build data table activity initially and give the columns names and save the output as dt1.
-once you used get text activity and store them in a variable.
-now use add data row activity and in arrayrow give the get text variables and in data table give dt1.
-now give write range this will write data in it.

Hope this would help you
—if we are getting the values from get text with different variables like out_value1, out_value2,…
—then we can use ADD DATAROW ACTIVITY where in the datatable we can mention the datatable variable name where we want to pass
And In the property ArrayRow pass the valeaie that we get from get text activity like this

Cheers @Samm

1 Like

Hi @Samm

There are different ways of doing it. Hence you are using get text to get the values in the web page, the values you extract to variables can be written in excel in different ways.

  1. You can write the data in the excel file using write cell. It sill write individual values into cells in the excel.
  2. Use write range to write all the data into excel. However to use a write range, you need to get the values in individual variables to a datatable. To do that you can use the below steps.
  3. Create a datatable variable and declare it. You might consider to use build datatable activity. Then use add data row activity to add the values as a array row to the data table.
    In add data row, use the array row input property and pass the variables as an array…

{Variable1, variable2, variable3}

Let me know whether it helps

I am getting an error saying Add data row : objet reference not set to an instance of object.

Hi @Samm

In the variables panel, for the datatable variable under default column initialize it to a new datatable object

New DataTable()

This time I am getting error as add data row : input array is longer than the number of columns in this table.

1 Like

This error issuely occurs when the variable in the activity where this error occurs has no value in it
Or null value
So kindly check whether the variable passed to add datarow has values in it
—for that pass them to writeline activity and can check the value at output panel whether the value is getting displayed or not
—if we are not passing any variable rather only values then we need to initiate the datatable passed with New System.Data.Datatable

Then this error occurs when the number of variable or value passed is not equal to the number of columns in the datatable. They must match with each other and also the type of all columns in the datatable and the values passed must ch with each other

That’s all you are done
Kindly try this and let know for any queries or clarification
Cheers @Samm

Flowchart.xaml (13.3 KB)

i have attached my work flow plz help me

Hi @Samm

I already update you xaml hope this might helpful to you.

Flowchart.xaml (14.6 KB)

cheers :smiley:

Happy learnings :smiley:

1 Like