How to save extracted data into one column dynamically

Hi,
I am not able to save the extracted data into column dynamically…Please help me with this.I have used data scrapping and write range activity.

Please check the Add Headers property of Write range activity and make it checked if not.

Hi @Bhagyashree_S ,

Is headers not get pasted or the extracted data?

The extracted data is not pasted

@Bhagyashree_S - Can you please follow my below instruction.

  1. First you read the input file and store into DT.
  2. Call For each activity and give input value is DT.
  3. Now you have an output value, just an update the value where you want. which means you need to write this value in specific excel file or else need to write an Separate NewDT.
  4. If you want to write in specific excel file and particularly specific column need to write an value, then you should be mention on specific cell value. (Example - You need to update the value column “C” then you should update "C2"or “C3”.
  5. Might be it will raise a question on your mind, how to change the cell # dynamically. In this part you should handle the row increment.

Since, you have a doubt please let me know.

Happy Learning :slightly_smiling_face:

@saijagadesh06
I have used “C” in write range but showing error as couldn’t write data table starting with cell C

Can you share screenshot of your workflow and if possible share excel file also?


I want to store the extracted data into result column

Why you have used C2+ 1?
You have to give only address like “C2” and it will add data from C2 range.

1 Like

Hi @Bhagyashree_S,

Please use “C2” for your range, this will allocate the blank cell where you can write your first value and so on.

Thanks,
Ken

I have added “C1” so it’s adding header i.e result and output for all the rows is updating in the “C2” cell.
I need all the outputs to be updated in the respective rows

Can you show me what you are getting in Extracted data table?
So you want only result column should be updated that is column “C” with respect to the values matched with column A from extracted data, is i understood correctly ?

Yes.

Then your flow is incorrect in that case.
Steps to achieve this -

1 - Get extracted data in datata table (You are already doing it).
2 - Read your input excel file and store data in new data table.
3 - Use foreachrow to iterate on excel data.
4 - Inside body of foreachrow use Filter activity to check row(“columnName”).toString is present in web extracted data table.
5 - Use if condition to check web extracted dt.rows.count>0 then write cell (Using WriteCellActivity)

Note: Create index of foreachrow from property so that it can be passed in Write cell Address As C + index.ToString

In the step 2 ,which activity need to be added …read range or write range? @ermanoj3101

Hi @Bhagyashree_S ,

I have created sample sequence for this just add your relevant variables
Skeleton.xaml (9.1 KB)
to it.

@Bhagyashree_S , Does the solution worked for you ?


error 6
I have used the same workflow…but its not even creating the header and its not saving any result into excel

whatever the data i have extracted using data scrapping that data need to be saved dynamically in the third column i e it should create header as result and it should save the extracted data dynamically.

Hi @Bhagyashree_S ,

Are you still stuck on this or this is resolved ?

You have to check in debug mode is their any matched data of excel and web extract because only matched data will be updated in Excel.

Note: Just Print Extract data with headers to check what values are coming in extraction dt.