Fill Excel file with variables

Hi everyone,
I am struck.
I am trying to get a couple of different data from a web page and i store them in a variable string.
How am I supposed to them use them in an Excel File.
There should be three columns for each data item, and below-the storred values.

HI @zhasmina.dimitrova

Check out this video link

1 Like

HI,

Can you elaborate?
There are some ways to achieve it, such as GetText, DataScraping to grab text from web page and WriteCell, WrtiteRange to write data into sheet.

Regards,

First I use Get Text Activity to get name, description and degrees in a number of cities.
I store these three values in var type String (not sure if it’s correct)
Afterwards, I must fill Excel table with the above information.
Name, description and degrees are the three columns and each column contain the values from the variables.
I decided to make three collections with the values and then I use Build Data Table and Add Row. However I am not sure how to add all columns. Now it works only for the first.
Add collection is in a For each loop.
Here it works for the first collection but I am not sure how to add the others.

Hi,

If you already have list of description and degrees, can you try as the following?

Set Int32 type idx variable at Index property of ForEach activity.

Then set {item,listDescription(idx),listDegrees(idx)} (for example) at ArrayRow.

Please modify the above to your actual variable name.

Regards,

Hi @zhasmina.dimitrova

Move you build datatable to before the place where you are getting the information you required

And move the add datarow into the for loop where you are getting the data for each iteration.

Now in add datarow pass

{name,desception,degree}

These 3 being the variables containing the required information

So for every loop when new data is read the datatable gets updated

Cheers

Thank you soooooo much! That’s what I needed to do. Worked perfeclty!

This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.