Get Text webpage and Write to CSV

Hi I’m going around in circles so would like some advice on order of activites

After a “for each row” activity (created successfully) I then need to get 3 pieces of info (3 different elements) off each web page and put it into CSV file before moving to next for webpage

Data scrap wizard is not working as I don’t have second element to create pattern

So was thinking
Get Text
Get Text
Get Text
Build Table
Write to CSV

I must must be missing a step as it creates the csv but with headings in my “build table” only.

@KarenL

csv has its own limitations, so try using excel or with the same csv flow write to csv after adding all data to built datatable. Avoid writing for each set data.

Hi @KarenL

Build Table only create data table with specified schema. It won’t add by default Get Text values to data table. You can use Add Data Row activity to insert values. Post that, use write to CSV activity.

1 Like

@singhonkar Thank you Thank you Thank you
that’s what I was missing… I have tried Add Data Column but not Add Data Row

Just have to fix selector as it pulling the wrong element and then work out order.

Okay so when putting it into the For each row sequence:

So I’d add the “get Text” in the For Each row sequence” and “add Data row”, Build table, Write CSV as a separate sequence at end of the whole flow??

Or do I add the “add data row” to the for each row and then the Build table and Write CSV as separate sequence

@KarenL

For each row activity is not required in your case. You can add all getText values to string array and iterate through the same with ForEach loop. Inside this, use Add row acitivity.

Post execution of ForEach loop, you’ll get all values in your Build Data table and use the same for Write CSV.

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