Compare two excel files with different sheets


I have two different excel files and both has different sheets. I want it to check in the first excel file has the sheets in the second file, if yes… then it should add the sheets from the second file to the first file.


Please elaborate. Provide an example while explaining. Manually how would you do this?

Do the sheets have unique names so that you just compare a list of names?

I have an excel file called Analysis forecast reports and another excel file called Sheets. I want the UiPath Sequence to check if the first excel file has the sheets of the second excel file and if not … then it should add them together

yes sheets have unique names, I just want them to be added together, but first i want a sequence that checks first. I don’t know how to make it check if the sheets exist or not

we get the sheet names with following activity: Get WorkBook Sheets
it will return an array of strings

Calculating if worksheets are in excel2 but not in excel1 we can use except method

arrMissingWS = arrWSExcel2.Except(arrWSExcel1).toArray

So finally we can transfer the Worksheets that we have calculated in arrMissingWS to the other Excel