Unable to get column value in excel

Hi All,

I am trying to fetch “AccountNumber” column values and check if column has 0 or not.
But AccountNumber is not considering as column name.

Any suggestion? how to get all values of AccountNumber

Hi @shuklarchana001 ,

Could you specify the range of the AccountNumber directly in the Read Range Activity?

For example, if the AccountNumber is present in the address E11, then do this:


Kind Regards,
Ashwin A.K

HI @shuklarchana001

Use Read Range Activity

Store the value in DT

Use For each row in Data Table Activity

CurrentRow In DT

Use Assign activity

LHS → Create an varibale
RHS → CurrentRow(“AccountNumber”).tostring


but Column will not be fixed.

Actually issue is accountnumber not consider as column. I tried with the same. It give error that, no accountnumber column

Hi @shuklarchana001 ,

Would you be so kind as to provide us with a sample template to work with?
You can remove the sensitive data and populate it with dummy data.

Kind Regards,
Ashwin A.K

Sure. Give me some time

@ashwin.ashok I have attached dummy data file.

Dummy Data.xlsx (12.5 KB)

Hi @shuklarchana001 ,

Could try this and see if the logic works as expected?

dt_sampleData.AsEnumerable().Where(Function(w) w.ItemArray.Contains("AccountNumber")).Select(Function(s) dt_sampleData.Rows.IndexOf(s)).First()

ReadColumnOnDifferentRow.xaml (8.3 KB)

Kind Regards,
Ashwin A.K

@ashwin.ashok I really appreciate you, it is reading as column name.

Could you please see below screen shot. When I am trying to check that account number column value has 0 in this column or not. So, I is not reading and move into else part.

Hi @shuklarchana001 ,

Could you try converting it to string, trim it and check once more?


Kind Regards,
Ashwin A.K

I did try with the same still moving on else part

Hi @shuklarchana001 ,

Please find the screenshot below for your reference:

ReadColumnOnDifferentRow_v1.xaml (11.4 KB)

Kind Regards,
Ashwin A.K

@ashwin.ashok Sorry, I did some mistake :woman_facepalming:

It is working.

Thank you

1 Like

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