Extract column B from Excel in put in data table

Want to extract Account no. from column B from Excel …Put this in data table …and use this account no one by to check account details.

How do I add column B data in data table…and how to use for loop to get this account no. One bye one to check details (want equations)

Please provide solution with attaching image …it helps me lot

Hi,

Please follow below simple steps to achieve your requirement.

  1. Use workbook read range to get the column data you have to specify your column name in the range eg: B:B(if you have account number in the B column). it will give you all the values in the Account number column and store the data into a data table.

  2. Use for each row activity assign your data table. And it will help you to loop one by one account numbers. To extract each account number use assign activity and use expression like CurrentRow(“Your Acct number column name”).tostring to get the account numbers one by one. please refer the below screenshot as you requested. thanks.

It works…but It takes blank cells too from column B.thats why it running in infinite loop…
I want value upto non zero cells

@rutuja.y

You can use Filter Datatable activity to filter the Nulls

Hope this will help you

Thanks

Hey,
you can use filter data table before for each and exclude all empty values.
Something like this:
image

Hi,

Please follow the suggestions from our members. And also for your question there is work around like below.

  1. Use work book read range to get the dynamic row count. use range as “” so that it will extract all the rows with the data and store it in Data table suppose DT1.

RowCount=DT1.rows.count

  1. Use the same step i mentioned in step1 this time use range “B1:B”+Rowcount.tostring

Try and let me know. thanks.

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