Hi,
There are 2 excel workbooks. The 1st workbook values are standard and 2nd workbook has dynamic values. We need to compare the 1st workbook 1st row data with 2nd workbook 1st row only and 2nd row in 1st workbook with 2nd row in 2nd workbook and so on. If the 1st row value in the 1st workbook not matches with 1st row in the 2nd workbook then we need to highlight that cell with a colour and 2nd row value in the 1st workbook not matches with the 2nd row in the 2nd workbook then we need to highlight that cell with a colour and so on.
Can any one suggest soloution for this.
Regards,
Raju
try the below steps
- Use Read range activity to read the first file data
- Use excel Scope
- Use Excel file and give second file as input
- for each excel row activity to iterate through rows of second file
- use for each activity and
dt.columns
here dt is first excel datatable
- use if condition to compare the data
Cdate(CurrentRow.ByField(column.ColumnName).ToString.Trim)=Cdate(dt.Rows(CurrentIndex-1).Item(column.ColumnName).ToString.trim)
- then block use format cells activity and give
Excel.Sheet("Sheet1").Range(CurrentRow.ByField(columnDisc(column.ColumnName)).Address)
and give formating details like color
- else block if you want you can keep any thing other wise leave blank
refer below file which is similar but make necessary changes
Formating.zip (18.2 KB)
Regards
Can you please explain in details please
do you have any confusion on the points or the file attached
Are you able to open the file?
if you can provide the sample files i can build
regards
the last column name is not same in both the files it is by mistake or
it is actually stay same for both
Regards
sorry. its by mistake.
it should be same for both files.
ok then i have made the flow
Compareandformat.xaml (16.5 KB)
but i have altered excel files first to second don’t get confused
you change the file names as per you requirement
if you still face any issue let me know
Regards
How to open this file in UiPath??
Regards,
just double click it will open
Regards
By any chance can we able to store only mismatched cells along with the headers??
Regards,
Raju
can you elaborate
where do you want to store them?
and in which format?
Regards
I want the mismatched cells with headers and Sl.No but not entire rows to store in the output file.
here I have highlighted the mismatched cells with the yellow colour for identification purpose.
Regards,
got about what data you require but also give the format of expected data
can you show the sample with screen shot
Regards
The out put should store in another excel file.
Regards,
i am not asking where to store but the format
SNo - ColName - Value
1 - colname - somedata
2 - ColName - some Data
2 - ColName - someData
3 - ColName - someData
the first line is header and remaing lines are data
it should be fine right?
Regards
check the below file
Compareandformat.xaml (19.4 KB)
Regards
I am not able to open this file in UiPath. please help me.
Regards,
do the same how you did previously like double clicking on it
Regards