ADD EXTRACTED DATA TABLE TO EXISTING TABLE IN EXCEL

Hi everyone please I have the below scenario:
-1-Get code from Excel sheet
2-Each code has a data table in the application
3-Extract that data table from the Application for each code
4-Add the data extracted from the application and write it under each code in Excel sheet.
how can write the extracted data under specific code in Excel for all codes?

@RPA_Dev13

can you show your input and requested output

as per your request it looks like you need to append data but after the code row instead can create a new file a you need …so after extraction can add a row at the start which will contian the code you search for and then use merge datatable or append range

cheers

For example, I have the codes I have to use each one as a key to extract the data table from the application:

image

after extraction, I want to add this data in the below format:
image

@RPA_Dev13

follow the approach as said above

cheers

I have a problem with the extracted data it overwrites the previous data not under each existing cod

Hi Guys,
thanks for your help, Just a quick update, the issue was solved by the below steps:
*- Rade Range(dt1)
*-Assign dt_codes=(From row in dt1.AsEnumerable() Select Convert.ToString(row(“GL Code”)) ).ToList
*-Assign for new data table NewDtaT= New DataTable
*-For each: List of Item=(dt_codes) and Item=code, to use the code for the extraction part.
1-Extract data table from the browser(ExtractDataTable)
2-add data Column: Name( “Code”)+Data Table(ExtractDataTable)
3-Invoke Methode: Opject: ExtractDataTable.Columns(“GL Code”)+Methode Name: SetOrdinal
4-Assign: ExtractDataTable.rows(0).Item(“Code”)=code
5-Merge Data Table: Source= ExtractDataTable + Destination= NewDataT
*-Write Range(to write the data with new format in excel sheet)
this the dt_code:
image
this is the new format after extracting the new data and merging it with dt_code data:
image

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