How to know data belongs to which column

Hello guys
I have an excel file, and I want to know each data belongs to which column?
for example, if the data in A it should print A if in B column should print B and so on so forth
Please help me?

Hi @marwan992,

You can make use of the following snippet by providing column headers.

  • Get all column names
  • Loop through column names
  • For each row
  • Get row item
  • If condition to check value exists
  • Matches breaks the loop

Please find the image for reference.

1 Like

i have problem with this instruction, contains is not a member of system.datatable

Please check the image for reference, you can use for loop to find the column.

1 Like

what is the type for dc ??

DataColumnCollection

1 Like

in the get row item i am facing error when i pass row in the activity ?

Use only row in the get row item and in the properties for Column you pass item

1 Like

still showing an error

send me screenshot of the error

1 Like

In For each loop, change the type from object to datacolumn

1 Like

I think you need to initialize datatable

1 Like

Is that value null or blank? In that case it may throw this error I think.

1 Like

could u check my xaml please Sequence2.xaml (11.6 KB)

hello @marwan992
Please assign a variable(Output) to Get Row Item Activity and then use that variable in IF Activity

Object Reference Not Set To An Instance Of An Object This error occurs whenever certain activity does not get value for further processing

1 Like

@vickydas hey
u mean to use the output variable in the condition ??
Thanks

hello @marwan992

Did you solve it or still facing Issues ??

1 Like

found the solution thanks a lot

1 Like