Extract set of rows from excel

Hi Team,

I would like to extract ‘address’ table from the below worksheet.

Please note that there might be additional rows going forward in all the tables. However, Address will be in first column only and the separator of each table is an empty row.

Could you please advise.

Thank you in advance.

Capture

load the excel in datatable, do a datatable.select for easy query(based on column name)

Can you please send me the xaml file?

it may useful -

But what exactly I’m looking for is. once the bot search for the ‘Address’ it should extract the below table until he finds the row which is empty.

I’m unable to put together the above steps.

first you have to search for Address in column 1 and then you have to get in between details untill it find an empty cell?? is that what you are looking for??
@syedbahauddin

yes exactly.

Note: When I read the Worksheet we don’t have any header.

1 Like

Well
you can do this!
1 - Read Range get output as outDataTable
2 - Assign(SecondDataTable = outDataTable.Clone)
3 - For Each Row (outDataTable)
4 - use if condition like this row(0).ToString.Contains(“Address”) then Assign(BoolIndicator = True)
5 - Another if condition like this pass BoolIndicatior in if use another If as if row(0).ToString = Nothing then Assign(Boolindicator = False) in
in Then part you can use Add Data Row to add in between rows like in ArrayRow = row.ItemArray and pass SecondDataTable in DataTable
6 - Write range and give SecondDataTable as DataTable then you will get in between row then you can loop through that datatable

Cheers @syedbahauddin

1 Like

Let me try this.

And thank you so much !! :grinning:

1 Like

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