Need help with Logic for excel manipulation

I need help with logic to get the desired out from an excel sheet. I want the code to be dynamic so can handle 1 or 2 or 3 company names up to 10 maximum. Any help with be appreciated. Thank you in advance.

Expected Input:

Expected Output:
|Full Legal Name|Address Line 1|Address Line 2|City|State|Zip Code|Country|
|Robotics LLC|Suite 110|Green Park|Austin|Texas|21345|UNITED STATES|
|Robotics LLC|Suite 110|Green Park|Austin|Texas|21345|UNITED STATES|
|Robotics LLC|Suite 110|Green Park|Austin|Texas|21345|UNITED STATES|
|Robotics LLC|Suite 110|Green Park|Austin|Texas|21345|UNITED STATES|
|Robotics LLC|Suite 110|Green Park|Austin|Texas|21345|UNITED STATES|
|Robotics LLC|Suite 110|Green Park|Austin|Texas|21345|UNITED STATES|
|Robotics LLC|Suite 110|Green Park|Austin|Texas|21345|UNITED STATES|
|Robotics LLC|Suite 110|Green Park|Austin|Texas|21345|UNITED STATES|
|Robotics LLC|Suite 110|Green Park|Austin|Texas|21345|UNITED STATES|
|Robotics LLC|Suite 110|Green Park|Austin|Texas|21345|UNITED STATES|

@Kore7989

Welcome to the community

Please follow

  1. Use read range and read the excel data into datatable dt
  2. Use build datatable and add required number of column of string type and make sure to assign a outdt variable in properties panel
  3. Use a for each activity with input argument as Enumerable.Range(1,dt.Columns.Count-1)
  4. Use an add data row activity with datatable as outdt and array row as {dt.Rows(0)(currentitem).ToString,dt.Row(1)(currentitem).ToString,dt.Rows(2).ToString…so on}
  5. After the loop use write range on new sheet or excel and write the outdt

In step 4 numbers represent each row…currentitem represents each column for each iteration …and as index starts from 0 used 0 for first row and so on

Hope this helps

Cheers

1 Like

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