The workflow is about reading the first row with multiple columns from excel and needs to compare this to another excel file first row with different column quantities and different values of the column.
If they are not the same, It will print a simple message.
If they are the same, I will print a simple message.
By the way, I’m using only Modern Activities on UiPath.
These are some files that have similar columns but the workflow is the same I need to compare these columns from different files.
test1.xlsx (8.2 KB)
test.xlsx (8.4 KB)
I.-I was trying this way but It only prints every char of the data table.
any ideas, please?
I’ve been reading other examples but It’s about 2 columns where the author only compares 2 columns, Could someone help me, please?
Can you share more specific sample such as input file and expected output etc?
There seems no data in test1.xlsx. Is this one of input file? Can you also share expected output?
Ohh, Basically, The objective is compare the columns quantity and values like “codigo incidente” , “mes”,“semana”, etc.
Bot has to compare that test1.xlsx and test.xlsx have the same column names and quantities.
I’m trying this one with a for each but I’m not getting good results.
If i understand your requirement correctly, the following will work, for example.
This flow check whether each value of specific columns in the row of 2 datatable are same or not.
CurrentRow("codigo incidente").ToString=dt2.Rows(idx)("codigo incidente").ToString AndAlso CurrentRow("Mes").ToString=dt2.Rows(idx)("Mes").ToString AndAlso CurrentRow("Semana").ToString=dt2.Rows(idx)("Semana").ToString
if the above is not your intention, please share specific input and output.
I’m trying to use that but when I’m inside the “For each row in DT”
I have to uncheck “Has Header” in the activity Read Range of the file if not the workflow doesn’t go there.
Did you do that as well?
Plus, When I’m inside the “For each row in DT”, If I print the value of CurrentRow(“Codigo Incidente”) doesn’t work but CurrentRow(“Column1”) works, and so on.
Instead of loop you can use flitter data table
Why do you uncheck HasHeader? Is there duplicated header name? If so, the following topic might help you.
Unfortunately, there is no way to ignore duplicated column name in ReadRange Activity. There are some workarounds as the following.
Uncheck AddHeaders property then read range without header area.
We need to use column index number instead of column name.
Read range with AddHeaders property unchecked.
Then, read first row and set each value as column name. if there are duplicated column name, change its name like “name-1”, “name-2”.
Finally, remove the first row.
IF I check “HasHeader” It doesn’t go into the loop I’m seeing this with the “debugging”
I guess there is no row except header. Can you share screenshot of the sheet?
Please check the below video. You can do a comparison of 2 data table and extract the similar and dissimilar rows.
This seems no problem. Can you share the above xlsx files and your workflow as file, if possible?
test.xlsx (8.4 KB)
test1.xlsx (8.3 KB)
test.zip (75.0 KB)
I think as I selected a single row, It takes that row as a column header when I checked “Has header” plus uipath shows me empty values because I don’t have a second row plus It doesn’t go to the loop.
I’m trying just to verify if the 2 excel files have the same column headers("Codigo Incidencia,Mes…etc) and column quantities.
test1.xlsx has 11 columns.
test.xslx has 13 columns.
Please, Let me know any information, thanks.