How I can write combine data of three columns in new column like this

image

Hi @Swarit_Goyal1

You can use the following LinQ in an Invoke Code activity:

io_dt.AsEnumerable.ToList.ForEach(Sub(row)
row("Combine") = row(Name).ToString+" "+row("RollNo").ToString+" "+row("Marks").ToString
End Sub)

Parameters for Invoke Code:

Hope this helps,
Best Regards.

Hi @Swarit_Goyal1

  1. Read Range activity:

    • Output: inputData
    • Specify the range and file path to read the data into the DataTable
  2. Add Data Column activity:

    • DataTable: inputData
    • ColumnName: CombinedColumn
  3. For Each Row activity:

    • DataTable: inputData
    1. Assign activity:
      • To: row(“CombinedColumn”)
      • Value: row(“Column1”).ToString() + row(“Column2”).ToString() + row(“Column3”).ToString()

I hope it helps!

Regards,

Hi @Swarit_Goyal1

I have attached the flow for your reference and the excel too. Please do check. Below are the conditions used in assign activity.

value1=CurrentRow(“Name”).ToString
value2=CurrentRow(“RollNo”).ToString
value3=CurrentRow(“Marks”).ToString
combinedValue=value1+vbLf+value2+vbLf+value3+vbLf

Input.xlsx (8.6 KB)

Hope it helps!!

Regards,

1 Like

Hi,

FYI, another approach using ForEachExcelRow

Sample20230519-4L.zip (14.9 KB)

Regards,

Can you guide how I can use this approach, If possible please upload xaml

1 Like

@Swarit_Goyal1

Please find the requested resources:

delNow.zip (146.3 KB)

Hope this helps,
Best Regards.

Thanks for helping can you please share xaml unable to download zip file

@Swarit_Goyal1

Sure, these are the files for your reference.

Main.xaml (6.6 KB)
Input.xlsx (8.2 KB)
Output.xlsx (8.3 KB)

Best Regards.

Thanks a lot

1 Like

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