How to read excel file with dynamic format

Hello all,

Il want to read an excel file with dynamic format, and there are merged cells, I wanted to retrieve values ​​based on specific labels. How I can do this please ?

Hi @sarra.meziane

Can you share some specifics of your requirement, it is too vague and scope unknown ?

I want to extract value in the right of ,Maroc,France,Italy,Espagne. The file sheet is dynamic not every time “Maroc” in column I ,J

Hi @sarra.meziane,

If the key is always MAROC, France, Italy, Espagne, and so on and their values are always on the right side, you could extract this as datatable in UiPath and then checks for those keys and get their values.

What I mean is for instance:

for/while loop
if robots finds “MAROC” then get the value on the right column at the same row.

There is a specific for loop for datatable it could be easier to loop using that. :slight_smile:

Best regards


Can explain me step by step please? I used a for each for dataTable, Thnks :slight_smile:

Hi again @sarra.meziane,

Could you try this workflow I created?

DynamicTable.xaml (15.1 KB)

Give it the necessary input such as the path of the excel and sheetname.
The following steps in workflow:

  1. The workflow gets the excel data as datatable.
  2. Using foreach row to loop through each row (note that the RowIndex variable is used here)
  3. Loop through each column (note that ColumnIndex variable is from this loop)
  4. If-statement to check for each row and column for the specific value (Good alternative is Switch activity to check and handle multiple keys).

I hope this helps as a start point workflow. :slight_smile:

Best regards


it’s work thank you !!!

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