How To append Two Cloumns in to another column in Excel using linq

Hi all,

I have one doubt how to add column1 and column2 values into Column3 using linq. Kindly Help me to do. For your reference i have attached snapshot.

Hello @Buvaneshwaran_R

Refer to the below post.

Hi @Buvaneshwaran_R

Try this appraoch

  1. Read the excel using read range and store in dt1

  2. use invoke code for writing the code by passing the dt1 as in/Out argument to the invoke code

Write the below code:

dt1.AsEnumerable().ToList().ForEach(Sub(r) r(“Column3”)= r(“Column1”).ToString+r(“Column2”).ToString)

  1. write the dt1 to excel using write range as well

Mark it as solution if it helps you :slight_smile:

Thanks & Regards,
Nived N

1 Like

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