How to add item into existing datatable in same row

Hi There,

I’m trying to capture the data by using data scraping and add the data into Excel Sheet, I’m able to get all the data and insert into Excel but I want to add new row when I get data from Data Scrapping, below is the example.

The result I get but not what I want:

The result I want but I cant get it:

The column “Capture Date” is I add in myself. Please assist for this issue.
I have attached my whole project. Thanks.

Main.xaml (27.0 KB) project.json (1.3 KB)

you want add row or add column in Existing Datatable?

Hey @ack940129,

Could you please share the screenshot of the table on webpage you are trying to extract ?

Thanks :slight_smile:

Hi @ack940129

Assuming the count of data rows is lower than 1000.

  1. Scraping or Reading the input datatable. Assuming YourScrappedTable

  2. Add Data Column activity:
    Column Name: "Capture Date"
    Datatable : YourScrappedTable
    TypeArgument : String

  3. For “row” in DatTable (For each row loop)
    Assign activity: item("Capture Date") = Now.ToString
    (this assigns value to the column “Capture Date” in the given row index)

  4. Finally, write the datatable (YourScrappedTable) to excel like you have already done.

1 Like

Thanks bro, this is work perfectly!

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