Use Read Range activity to read the data from excel files and it will give output as DataTable. Let’s say InputDT1 and InputDT2.
DataTable outputDT = InputDT1.Clone
And then try below Linq query.
OutputDT = ( From a in InputDT1 Join b in InputDT2 On a("Col1").ToString Equals b("Col1").ToString Select OutputDT.Rows.Add({a("Col1"), Cint(a("Col1").ToString.Trim)+Cint(b("Col1").ToString.Trim)}))
At the end of the expression write CopyToDataTable.
OutputDT = ( From a in InputDT1 Join b in InputDT2 On a("Col1").ToString Equals b("Col1").ToString Select OutputDT.Rows.Add({a("Col1"), Cint(a("Col1").ToString.Trim)+Cint(b("Col1").ToString.Trim)})).CopyToDataTable
There is a small mistake in terms of Columns in the expression…
Updated:
OutputDT = ( From a in InputDT1 Join b in InputDT2 On a(“Col1”).ToString Equals b(“Col1”).ToString Select OutputDT.Rows.Add({a(“Col1”), Cint(a(“Col2”).ToString.Trim)+Cint(b(“Col2”).ToString.Trim)})).CopyToDataTable