Column Name does not belongs to data table exception - Issue

I used the below query to get the mismatched data rows in DT. While using this i got exception as, column name does not belongs to table.I written the column name in both tables, it exist

FCDT.AsEnumerable().Where(Function(row) Not ICDT.AsEnumerable().Select(Function® r.Field(Of String)(“Claim_No”)).Any(Function(x) x = row.Field(Of String)(“Claim_No”))).CopyToDataTable()

@qbss Can you Check with this Query :

FCDT.AsEnumerable().Where(function(row) Not ICDT.AsEnumerable().Select(function® r(“Claim_No”).ToString.Trim).Any(function(x) x = row(“Claim_No”).ToString.Trim).CopyToDataTable()

1 Like

When i use this query, character is not valid exception occurred

@qbss Use this :sweat_smile: :
FCDT.AsEnumerable().Where(function(row) Not ICDT.AsEnumerable().Select(function(a) a(“Claim_No”).ToString.Trim).Any(function(x) x = row(“Claim_No”).ToString.Trim).CopyToDataTable()

This also not working, i dont know why this exception occurred.

@qbss What is the error now? The Same error? if it is a different error Can you show a Screenshot o fit?

same error, column does not exist

@qbss Can you provide the Excel Files that you are reading as Datatables?

Input.xls (10.5 KB)

@qbss Can you Check this Workflow and The Output File :
NewSequence.xaml (5.3 KB)

Output.xlsx (7.5 KB)

I used the Query that you have put in the First Post, and it worked :sweat_smile:

1 Like

If the use the query in separate xaml it’s working, when used in invoke file its not working. that’s the problem. even though i written the datatable. it all having value.

@qbss So When using Invoke Workflow What are the arguments you are passing?

I Passed two data tables as arguments(Full claims DT, and Input Claims DT)

@qbss Can you post the Screenshot of the Workflow you are using ?

@qbss Are you passing the Datatables to this Workflow ? If So, Why are you using Read range again?

i tried both the way, its not working.

@qbss Have you Checked the Datatables of both the Sheets using Output Datatable and Message Box ?