Inconsistent datatable columns and rows created from same Excel template


Does anyone know the reason why when I use a read range activity to read an entire Excel spreadsheet, the datatable that is generated in UiPath does not have a consistent format?

What is happening is that I have for example, 2 Excel spreadsheets with the same template. The first row and first column in the spreadsheet is empty, for example. However, when I read range those two Excel spreadsheets with the same formatting, the datatable that is produced in UiPath is not the same. One datatable will have an empty first column, but the other one seemed to remove the empty column automatically.

Any clue why this is happening? It is messing up with my automation logic.


Hi @morning.karen !
Welcome to UiPath Community :grinning_face_with_smiling_eyes:
Would you mind sending us dummy data with your use case ? (or pictures so we are sure to understand your case)
Did you check if in both cases your read range activities have:

  • the same data as for starting cell ?
  • the same options “Add headers” (checked or not)

There probably is something different about each sheet that you just can’t see. Excel is good for this.

As a test/proof, delete the second sheet, then duplicate the first sheet. Now run it and both datatables should be identical.

Either way, you can simply use Filter Datatable to remove unnecessary columns and/or rows.