How to compare two excel sheets values?

Hi all
How to compare two excel sheets on the basis of certain columns: either they match or not? Suppose I have two excel sheets, one is “trail” and other is “statement”. How to compare “column debit” of trail with “column credit” of statement?And if values match then it has to return “trail” table in new excel. I am trying to perform the task but not getting the desired output. Sharing the files please help me with the changes required.ABC.zip (53.9 KB)

You need to use Indexes in the For Each action to compare values in cells.

Here is an updates recording. Hope it helps :grinning:
ABC.zip (37.3 KB)

Thanks ashapkina… But its showing an error on step 6.error

What is the text of the error?

Make sure you don’t have cells with NULL value in Excel files (the files you sent in the previous post had them) and the bot doesn’t copy empty cells when you copy excel data to a table. If you do, it will copy all these empty values to the table and try to iterate through them.

error text message: “Error evaluating condition in IfElseAction
com.workfusion.studio.rpa.recorder.playback.PlaybackException: Error evaluating condition in IfAction[condition=(row[5]) == (RString.of(”${credit[${counter}]}")),arguments=ActionArguments[leftOperand=[${row[5]}],delay=[0],leftOperandType=[EXPRESSION],rightOperand=[${credit[${counter}]}],xsi:type=[recorder:IfElseAction, recorder:IfElseAction],pollingInterval=[300],active=[true],rightOperandType=[STRING],actionDetails=[(row[5] = credit[${counter}])],awaitTimeout=[5000]]]
at com.workfusion.studio.rpa.recorder.playback.action.IfAction.execute(IfAction.java:108)
at com.workfusion.studio.rpa.recorder.playback.action.IfAction.execute(IfAction.java:25)
at com.workfusion.studio.rpa.recorder.playback.player.ActionPlayer.next(ActionPlayer.java:64)
at com.workfusion.studio.rpa.recorder.player.PlaybackLogic.playNextAction(PlaybackLogic.java:152)
at com.workfusion.studio.rpa.recorder.player.PlaybackLogic.run(PlaybackLogic.java:112)
at java.lang.Thread.run(Thread.java:745)
Caused by: java.lang.IndexOutOfBoundsException: Incorrect element index ‘707’ for 1-based RList of 706 element(s)
at com.workfusion.studio.rpa.recorder.api.types.RList.checkPosition(RList.java:560)
at com.workfusion.studio.rpa.recorder.api.types.RList.getAt(RList.java:277)
at com.workfusion.studio.rpa.recorder.api.types.RList.getAt(RList.java:289)
at com.workfusion.studio.rpa.recorder.api.types.RList.getAt(RList.java:43)
at java.lang.invoke.MethodHandle.invokeWithArguments(MethodHandle.java:627)
at java.lang.invoke.MethodHandle.invokeWithArguments(MethodHandle.java:649)
at com.workfusion.studio.rpa.recorder.api.internal.invocation.MethodInvocationHandler.invoke(MethodInvocationHandler.java:75)
at com.workfusion.studio.rpa.recorder.api.types.RList.invokeMethod(RList.java:161)
at org.codehaus.groovy.runtime.callsite.PogoInterceptableSite.call(PogoInterceptableSite.java:47)
at org.codehaus.groovy.runtime.callsite.AbstractCallSite.call(AbstractCallSite.java:128)
at Script8.run(Script8.groovy:7)
at com.workfusion.studio.rpa.recorder.playback.shell.GroovyShellWrapper.evaluateCondition(GroovyShellWrapper.java:80)
at com.workfusion.studio.rpa.recorder.playback.player.PlaybackContext.evaluateCondition(PlaybackContext.java:69)
at com.workfusion.studio.rpa.recorder.playback.action.IfAction.execute(IfAction.java:99)
at com.workfusion.studio.rpa.recorder.playback.action.IfAction.execute(IfAction.java:25)
at com.workfusion.studio.rpa.recorder.playback.player.ActionPlayer.next(ActionPlayer.java:64)
at com.workfusion.studio.rpa.recorder.player.PlaybackLogic.playNextAction(PlaybackLogic.java:152)
at com.workfusion.studio.rpa.recorder.player.PlaybackLogic.run(PlaybackLogic.java:112)
at java.lang.Thread.run(Thread.java:745)"
and after removing all the null values it still showing this error.

These are the updated files without any null valuesABC.zip (50.9 KB)
… may be i am doing something wrong.Please check if i am doing something wrong.

There are null values in the files.
Try disabling the For Each action and see what is saved in he table in the execution-result.log.

still showing same issue.

There are fewer elements in the list than the bot is trying to process. Try putting the action inside Exception Handling.

i am trying to compare these two columns of different tables where i am avoiding the null values with “0.0”. and if these values match i want to add a column to the table which contains status either they match or nor i.e true or false. if you could showcase me a dummy without having null values can solve my problem…beacuse it is stucked there only.

The files I posted with the recording don’t have null values

Or you can use Exception handling so the recording doesn’t fail.

To set the status, you can use Set cell value action

Thanks ashapkina… Solved my problem!!

1 Like

outputval
I am trying to perform this task for the the cells which does not contain value “0.0” but while performing this it still giving “0” as output in match excel. Documents.zip (46.7 KB)

Hey, I tried to put not contains and not equals but while putting both the conditions why it is showing values thats contains “0.0”? Is there any other way to put such conditions?