Dynamic Extraction of Data Blocks from Excel

Hi all,
I have difficulties with creating a process which need some help and ideas from everyone who able to help.

I have one excel file which have data on producs as below:

I need to read the product id by by box which each Box has 25 product id. And the product id need to be read one by one and fill in into the website form one by one .

For example, I read productid 1 from Box 1 and fill into website form and then click enter . Then continue read productid 2 from Box 1 and fill into website form and then enter. Follow by all those 25 product id . Then I have to save all those 25 product id inserted .

Then read Box 2 data and follow by others.

My issue is that I am not sure how to read the data in that pattern. I use read range to read the whole sheet and output into datatable
Then i use for each to read row, but when I assign the column name to ‘Box 1’ . The uipath prompt error , no Box 1 in datatable.

I really hope anyone can help me on this.

If your data is always in that same shape, you should use one read range for each box, and use the option to not include the headers, range would be like A5:B29 for the box 1…


If the input seems to be of same structure.

We can read the excel with respect to ranges specified and process.

Example : Box1 data Range can be specified as B5:B30 . So It Holds a single column with all the box1 values.

1 Like

feel free to upload your sample excel here. Based on this some dynamic parsing techniques can be worked out for you

Below is the example of my excel file
Book2.xlsx (10.8 KB)

It is xlsx file. Yes on the same column will also contain other box product id which suppose to be read separately according to box.

But the issue is that the number of box can be increasing and decreasing.
If I read data range by specific , in future might have additional box and that box will not read by uipath which only read 6 Box for now.

I guess the easiest way will be to use Read Range with "A:H" without adding headers, your data will start to be valid on row with index 4, so inside For Each Row you enable the index variable and with IF condition index>=4 you start to use your data like this:
Box1 Product IDs will be here: row(1)
IF Not String.IsNullOrEmpty(Convert.ToString(row(4)))
Box 2 ID = row(4)
IF Not String.IsNullOrEmpty(Convert.ToString(row(7)))
Box 3 ID = row(7)
IF index>=25
Box4 Product IDs will be here: row(1)
And so on…

1 Like

I worked out a sample for you showcasing on how an extraction could be done. With some alignments I made the implementation flexible and stressed it with this as well:

Extraction was possible for your and my tables.


  • no overlapping data within the cols. Does mean we can detect blocks and if a block starts on Column B, then no Block will start on Column C (Overlappings)

Find XAML here:
NAJAA_BAZILAH.xaml (16.0 KB)
Excel Here:
Book2_PPR.xlsx (12.6 KB)

Have a look on the comments in the xaml and explorer it by debugging and breakpoint setting. As mentioned within, the Part for marker calculation was done quickly with LINQ. But we can shift to essential UiPath Activities as well.

1 Like

Thank your for your help, I will try it first.

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