Excel value Assign issue

Hi I am trying to assign a dt1 value to resultdt same as from dt2 value to resultdt. But I am asigning value to resultdt .but it is throwing an error that dt1 value can’t assigned to resultdt.

Hi @Sai17 ,
Can you share your input and expect output?
regards

1 Like

could you please explain clearly?

1 Like

I have to compare two excels if there is match found for dt1 current row value with dt2 data for a particular column .Then I have to assign the values to result dt based on their column name from both dt1 and dt2

In this I’m getting issue that dt1.rows(indxNumbr).item(“ColumnName”)=currentrow(“ColumnName”) ie
indxNumber from for each or
dt1.rows(indxNumbr).item(“ColumnName”)=dt2.rows(rowindx).item(“ColumnName”) i.e rowindex from lookup

@Sai17

gives you the matched columns

dt.asenumberable.where(function(x) dt2.asenumberable.any(function(a) a(“columnName”).tostring=x(“ColumnName”).tostring)).copytodatatble

I need to map the data to resultdt ie…, third data table

@Sai17

resultdt=dt.asenumberable.where(function(x) dt2.asenumberable.any(function(a) a(“columnName”).tostring=x(“ColumnName”).tostring)).copytodatatble

1 Like

Thanks for the response. resultdt is a template so I need to map the fields from both datatables

For me Filtered data part is done .but I’m trying to map the fields to result template when I try to assign the values it throwing an error that can’t be assigned .
this is the way I’m assigning the values dt1.rows(indxNumbr).item(“ColumnName”)=currentrow(“ColumnName”) ie
indxNumber from for each or
dt1.rows(indxNumbr).item(“ColumnName”)=dt2.rows(rowindx).item(“ColumnName”) i.e rowindex from lookup

@Sai17

if possible can you share the xaml

so that i can help

1 Like

Excel_Comparision1.zip (15.0 KB)

@Sai17

image

Check the above once both havings 2 rows only then how can you compare

thanks for the response. My issue is I want assign that matched data into result dt. dt2 data is available in dt1. that data should be mapped to the fields of result dt

Excel_Comparision1.zip (15.0 KB)
Try to run this. I am getting an error I want to resolve that.