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.
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…
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…
@NAJAA_BAZILAH
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:
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)
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.