<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: compare columns data in 2 sheets and update if it matches, which has around 1 lakh data. in Digital Exchange</title>
    <link>https://community.blueprism.com/t5/Digital-Exchange/compare-columns-data-in-2-sheets-and-update-if-it-matches-which/m-p/111821#M3632</link>
    <description>&lt;P&gt;Thank you&amp;nbsp;&lt;a href="https://community.blueprism.com/t5/user/viewprofilepage/user-id/36564"&gt;@faheemsd&lt;/a&gt;&amp;nbsp;..&lt;/P&gt;</description>
    <pubDate>Tue, 25 Jun 2024 07:46:20 GMT</pubDate>
    <dc:creator>Karthik.choppadandi</dc:creator>
    <dc:date>2024-06-25T07:46:20Z</dc:date>
    <item>
      <title>compare columns data in 2 sheets and update if it matches, which has around 1 lakh data.</title>
      <link>https://community.blueprism.com/t5/Digital-Exchange/compare-columns-data-in-2-sheets-and-update-if-it-matches-which/m-p/111768#M3629</link>
      <description>&lt;P&gt;I have to compare 2 sheets, which has around 1 lakh data.&amp;nbsp;Two sheets (&amp;nbsp;A &amp;amp; B) &lt;STRONG&gt;A&lt;/STRONG&gt; has two columns A1 and A2. &lt;STRONG&gt;B&lt;/STRONG&gt; has two columns B1 and B2. In my case Some of the value in A and B1 are same, for such cases I want to update B2 = A2. So A2 should take the value from B2 when A1 = B1.&lt;BR /&gt;&lt;BR /&gt;I tried with utility collection but it's not working and i have tried with 20K data which is taking lot of time. If we can achieve this by oledb or any other way. Can anyone help on this..&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;</description>
      <pubDate>Sat, 22 Jun 2024 14:49:22 GMT</pubDate>
      <guid>https://community.blueprism.com/t5/Digital-Exchange/compare-columns-data-in-2-sheets-and-update-if-it-matches-which/m-p/111768#M3629</guid>
      <dc:creator>Karthik.choppadandi</dc:creator>
      <dc:date>2024-06-22T14:49:22Z</dc:date>
    </item>
    <item>
      <title>Re: compare columns data in 2 sheets and update if it matches, which has around 1 lakh data.</title>
      <link>https://community.blueprism.com/t5/Digital-Exchange/compare-columns-data-in-2-sheets-and-update-if-it-matches-which/m-p/111769#M3630</link>
      <description>&lt;P&gt;Dear&amp;nbsp;&lt;a href="https://community.blueprism.com/t5/user/viewprofilepage/user-id/59284"&gt;@Karthik.choppadandi&lt;/a&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Collection doesn't work for the huge amount of data in Excel, you need to create a Custome code object and call the page in the process to get the result in Excel.&lt;/P&gt;&lt;P&gt;Please try the below code in code stage&amp;nbsp;&lt;/P&gt;&lt;P&gt;Sub UpdateSheetB()&lt;BR /&gt;' Declare variables&lt;BR /&gt;Dim wsA As Worksheet, wsB As Worksheet&lt;BR /&gt;Dim lastRowA As Long, lastRowB As Long&lt;BR /&gt;Dim dict As Object&lt;BR /&gt;Dim i As Long&lt;BR /&gt;&lt;BR /&gt;' Set worksheets&lt;BR /&gt;Set wsA = ThisWorkbook.Sheets("SheetA") ' Replace with the name of your first sheet&lt;BR /&gt;Set wsB = ThisWorkbook.Sheets("SheetB") ' Replace with the name of your second sheet&lt;BR /&gt;&lt;BR /&gt;' Get the last row in each sheet&lt;BR /&gt;lastRowA = wsA.Cells(wsA.Rows.Count, "A").End(xlUp).Row&lt;BR /&gt;lastRowB = wsB.Cells(wsB.Rows.Count, "A").End(xlUp).Row&lt;BR /&gt;&lt;BR /&gt;' Create a dictionary to store the values from SheetA&lt;BR /&gt;Set dict = CreateObject("Scripting.Dictionary")&lt;BR /&gt;&lt;BR /&gt;' Loop through SheetA and add values to the dictionary&lt;BR /&gt;For i = 1 To lastRowA&lt;BR /&gt;dict(wsA.Cells(i, 1).Value) = wsA.Cells(i, 2).Value&lt;BR /&gt;Next i&lt;BR /&gt;&lt;BR /&gt;' Loop through SheetB and update values&lt;BR /&gt;For i = 1 To lastRowB&lt;BR /&gt;If dict.exists(wsB.Cells(i, 1).Value) Then&lt;BR /&gt;wsB.Cells(i, 2).Value = dict(wsB.Cells(i, 1).Value)&lt;BR /&gt;End If&lt;BR /&gt;Next i&lt;BR /&gt;&lt;BR /&gt;' Clean up&lt;BR /&gt;Set dict = Nothing&lt;BR /&gt;End Sub&lt;/P&gt;&lt;P&gt;Input Parameters:&amp;nbsp;&lt;BR /&gt;&lt;BR /&gt;SheetA - your Worksheet name&lt;/P&gt;&lt;P&gt;SheetB - your worksheet name&lt;/P&gt;&lt;P&gt;lastRowA&amp;nbsp; - Row count of last row for SheetA&amp;nbsp;&lt;/P&gt;&lt;P&gt;lastRowB&amp;nbsp; - Row count of last row for SheetB&lt;/P&gt;&lt;P&gt;Please apply this code and see the result.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Sun, 23 Jun 2024 09:49:25 GMT</pubDate>
      <guid>https://community.blueprism.com/t5/Digital-Exchange/compare-columns-data-in-2-sheets-and-update-if-it-matches-which/m-p/111769#M3630</guid>
      <dc:creator>faheemsd</dc:creator>
      <dc:date>2024-06-23T09:49:25Z</dc:date>
    </item>
    <item>
      <title>Re: compare columns data in 2 sheets and update if it matches, which has around 1 lakh data.</title>
      <link>https://community.blueprism.com/t5/Digital-Exchange/compare-columns-data-in-2-sheets-and-update-if-it-matches-which/m-p/111806#M3631</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.blueprism.com/t5/user/viewprofilepage/user-id/59284"&gt;@Karthik.choppadandi&lt;/a&gt;&amp;nbsp;,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Whenever you are working with a very large dataset like in terms of lakhs, you directly cannot rely on collections as Blue Prism is a 32-bit application (now, with v7.2+ we have 64-bit application) and if you try to store all this data in a collection, the internal memory will easily go out of space causing Blue Prism service to crash. The same concept also applies even if you use OLEDB connections however OLEDB is faster than your regular excel operations still the problem lies with the fact that you cannot store more than the required limit in a collection at a time.&lt;BR /&gt;&lt;BR /&gt;Hence, the main problem to automate use cases with large dataset is that if you want to automate these use cases using Blue Prism's collection data item then you need to have a chunking mechanism while you operate with collections, that means, while you read the data from any external source (excel, database, access, web table etc.), you need to have some sort of logic which can break the data in terms of buckets and that you can store in collection and work with the same. So technically, even if you use OLEDB you would need some sort of chunking logic in your select queries. This can be a bit complicated and again the processing time will be a lot. For this reason, your best bet would be to somehow interact with the external application itself which in our case is Excel and get your operations work on that application without relying on collections itself.&amp;nbsp;&lt;BR /&gt;&lt;BR /&gt;&lt;a href="https://community.blueprism.com/t5/user/viewprofilepage/user-id/36564"&gt;@faheemsd&lt;/a&gt;&amp;nbsp;has provided you with an excellent approach that can directly work within the excel file itself and since it uses dictionary it would be memory efficient from a time complexity approach.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;On the same note, I would want to also share another approach that most often stays hidden&amp;nbsp;but performance wise it is the best approach available out there and it has helped me a lot in past when I have worked with use cases similar to yours which is using Power Queries. I have a &lt;A href="https://community.blueprism.com/t5/Product-Forum/Automating-Power-Query/m-p/66037#M18642" target="_self"&gt;detailed guide&lt;/A&gt; on how it can be used with Blue Prism. For your use case though, I can share the redefined steps that can help you to implement it faster:&lt;BR /&gt;&lt;BR /&gt;&lt;STRONG&gt;Creating Power Query Template File:&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;1) Create a blank excel workbook file and create a sheet called '&lt;STRONG&gt;Parameters&lt;/STRONG&gt;' where we will have the placeholders for storing our input values which in our case would be the file paths for both the excel data sources where you want to do the comparison and the sheet names belonging to each one of them.&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="devneetmohanty07_0-1719190201756.png" style="width: 999px;"&gt;&lt;img src="https://community.blueprism.com/t5/image/serverpage/image-id/38695iA29BCDCC311E0019/image-size/large/is-moderation-mode/true?v=v2&amp;amp;px=999" role="button" title="devneetmohanty07_0-1719190201756.png" alt="devneetmohanty07_0-1719190201756.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;2) Now, for this step ensure you have each of the data cell where the values will be entered for this power query file to work as &lt;STRONG&gt;named ranges&lt;/STRONG&gt;. To create a named range, you just have to select the data cell and then in the address bar of excel as I have highlighted below&amp;nbsp;you will need to write some name which can refer to this particular cell and press &lt;STRONG&gt;Enter&lt;/STRONG&gt; (very important otherwise it does not get saved). You can think of it as variable names that we will use in further steps:&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="devneetmohanty07_1-1719190516646.png" style="width: 400px;"&gt;&lt;img src="https://community.blueprism.com/t5/image/serverpage/image-id/38696i068FB82DDD63C644/image-size/medium/is-moderation-mode/true?v=v2&amp;amp;px=400" role="button" title="devneetmohanty07_1-1719190516646.png" alt="devneetmohanty07_1-1719190516646.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Similarly, I did the same for the other two cells which I would name as &lt;STRONG&gt;InputFilePath2&lt;/STRONG&gt; and &lt;STRONG&gt;InputSheetName2&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;3) Now for this step, we need to create a power query connection. To do this we need to navigate to&amp;nbsp;&lt;STRONG&gt;Data -&amp;gt; Get Data -&amp;gt; Launch Power Query Editor&lt;/STRONG&gt;:&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="devneetmohanty07_2-1719190761499.png" style="width: 400px;"&gt;&lt;img src="https://community.blueprism.com/t5/image/serverpage/image-id/38697i965BABBDADF26316/image-size/medium/is-moderation-mode/true?v=v2&amp;amp;px=400" role="button" title="devneetmohanty07_2-1719190761499.png" alt="devneetmohanty07_2-1719190761499.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;4) Now, in the Power Query Editor, just to start with the use case, we need to add a recent source which for now we would need to manually add but later on I will show how we will make it dynamic from the &lt;STRONG&gt;Parameters&lt;/STRONG&gt; sheet. Add both the sources for Sheet A and Sheet B, here I have just shown it for one sheet:&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="devneetmohanty07_3-1719191297315.png" style="width: 400px;"&gt;&lt;img src="https://community.blueprism.com/t5/image/serverpage/image-id/38698iC1C8F41370E84C1E/image-size/medium/is-moderation-mode/true?v=v2&amp;amp;px=400" role="button" title="devneetmohanty07_3-1719191297315.png" alt="devneetmohanty07_3-1719191297315.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;5) Once you have added your data sources, we would select the second data source and click on&amp;nbsp;&lt;STRONG&gt;Merge Queries -&amp;gt; Merge Queries As New&lt;/STRONG&gt;&amp;nbsp;since we want another table with all the comparison results in a different view/sheet:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="devneetmohanty07_7-1719191679823.png" style="width: 999px;"&gt;&lt;img src="https://community.blueprism.com/t5/image/serverpage/image-id/38702i914B05ED96EAC5A3/image-size/large/is-moderation-mode/true?v=v2&amp;amp;px=999" role="button" title="devneetmohanty07_7-1719191679823.png" alt="devneetmohanty07_7-1719191679823.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;6) Now, in the Merge window, simply select the table A and table B, select the columns A1 and B1 where we want to perform a Merge operation, select Full Outer Join as we want to get all the rows from both the tables whether they match or not and click on &lt;STRONG&gt;OK&lt;/STRONG&gt;:&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="devneetmohanty07_8-1719191868543.png" style="width: 999px;"&gt;&lt;img src="https://community.blueprism.com/t5/image/serverpage/image-id/38703iACECD09938C71CD6/image-size/large/is-moderation-mode/true?v=v2&amp;amp;px=999" role="button" title="devneetmohanty07_8-1719191868543.png" alt="devneetmohanty07_8-1719191868543.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;7) This should give us a new table now, called as&amp;nbsp;&lt;STRONG&gt;Merged1&lt;/STRONG&gt; and we can use it now for further transformation. At this step, also click on the expand button to expand all the columns from Table B:&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="devneetmohanty07_9-1719191972680.png" style="width: 999px;"&gt;&lt;img src="https://community.blueprism.com/t5/image/serverpage/image-id/38704iC2DE8DCADC11AD2B/image-size/large/is-moderation-mode/true?v=v2&amp;amp;px=999" role="button" title="devneetmohanty07_9-1719191972680.png" alt="devneetmohanty07_9-1719191972680.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-unicode-emoji" title=":smiling_face_with_sunglasses:"&gt;😎&lt;/span&gt; Now, we will simply right click on our columns and the table and rename them to make the transformation simpler in the next steps:&lt;BR /&gt;&lt;BR /&gt;New Column Names:&amp;nbsp;&lt;STRONG&gt;B1&lt;/STRONG&gt;,&amp;nbsp;&lt;STRONG&gt;B2&lt;/STRONG&gt;&lt;BR /&gt;New Table Name:&amp;nbsp;&lt;STRONG&gt;Final&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="devneetmohanty07_10-1719192120830.png" style="width: 999px;"&gt;&lt;img src="https://community.blueprism.com/t5/image/serverpage/image-id/38705iDBA214B3744AF85B/image-size/large/is-moderation-mode/true?v=v2&amp;amp;px=999" role="button" title="devneetmohanty07_10-1719192120830.png" alt="devneetmohanty07_10-1719192120830.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;9) We will now add a new column here to our merged dataset by selecting the last column and then navigating to&amp;nbsp;&lt;STRONG&gt;Add Column -&amp;gt; Conditional Column&lt;/STRONG&gt;:&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="devneetmohanty07_11-1719192313791.png" style="width: 999px;"&gt;&lt;img src="https://community.blueprism.com/t5/image/serverpage/image-id/38706i8FA5A8D80C0CAE1A/image-size/large/is-moderation-mode/true?v=v2&amp;amp;px=999" role="button" title="devneetmohanty07_11-1719192313791.png" alt="devneetmohanty07_11-1719192313791.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;10) In this step we will add the condition for this column called '&lt;STRONG&gt;A&lt;/STRONG&gt;' to be populated with the condition that if column&amp;nbsp;&lt;STRONG&gt;A1&lt;/STRONG&gt; is null then, we should pick the data from column&amp;nbsp;&lt;STRONG&gt;B1&lt;/STRONG&gt; otherwise we would take&amp;nbsp;&lt;STRONG&gt;A1&lt;/STRONG&gt; data. Put the condition values as shown below for each highlighted box and click on &lt;STRONG&gt;OK&lt;/STRONG&gt;:&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="devneetmohanty07_12-1719192655306.png" style="width: 999px;"&gt;&lt;img src="https://community.blueprism.com/t5/image/serverpage/image-id/38707iAA3A7D30356E4342/image-size/large/is-moderation-mode/true?v=v2&amp;amp;px=999" role="button" title="devneetmohanty07_12-1719192655306.png" alt="devneetmohanty07_12-1719192655306.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;11) Similarly, add another custom column as mentioned in step 9. We will now add another column called as '&lt;STRONG&gt;B&lt;/STRONG&gt;' with the condition that if column&amp;nbsp;&lt;STRONG&gt;A1&amp;nbsp;&lt;/STRONG&gt;is equal to column&amp;nbsp;&lt;STRONG&gt;B1&lt;/STRONG&gt; then take&amp;nbsp;&lt;STRONG&gt;A2&lt;/STRONG&gt; value otherwise if column&amp;nbsp;&lt;STRONG&gt;B1&amp;nbsp;&lt;/STRONG&gt;is equal to null then select column&amp;nbsp;&lt;STRONG&gt;A2&lt;/STRONG&gt; value otherwise take&amp;nbsp;&lt;STRONG&gt;B2&lt;/STRONG&gt; value and click on the &lt;STRONG&gt;OK &lt;/STRONG&gt;button:&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="devneetmohanty07_13-1719193111741.png" style="width: 999px;"&gt;&lt;img src="https://community.blueprism.com/t5/image/serverpage/image-id/38708i6B3A3CD8FBC77DFB/image-size/large/is-moderation-mode/true?v=v2&amp;amp;px=999" role="button" title="devneetmohanty07_13-1719193111741.png" alt="devneetmohanty07_13-1719193111741.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;12) Now, we can remove the other columns as we do not need those. For this, we will select other columns and right click to select&amp;nbsp;&lt;STRONG&gt;Remove Columns&lt;/STRONG&gt; option:&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="devneetmohanty07_14-1719193227168.png" style="width: 999px;"&gt;&lt;img src="https://community.blueprism.com/t5/image/serverpage/image-id/38709iDE8BB355D6996FE3/image-size/large/is-moderation-mode/true?v=v2&amp;amp;px=999" role="button" title="devneetmohanty07_14-1719193227168.png" alt="devneetmohanty07_14-1719193227168.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;13) Now, click on&amp;nbsp;&lt;STRONG&gt;Close &amp;amp; Load&lt;/STRONG&gt; option to save our transformation results:&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="devneetmohanty07_16-1719193362328.png" style="width: 999px;"&gt;&lt;img src="https://community.blueprism.com/t5/image/serverpage/image-id/38711i143CBA09BD6C3F2E/image-size/large/is-moderation-mode/true?v=v2&amp;amp;px=999" role="button" title="devneetmohanty07_16-1719193362328.png" alt="devneetmohanty07_16-1719193362328.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;14) Now, you can see we have all our transformed table presented in different sheets. Since, we do not want the A and B sheets, we can delete those:&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="devneetmohanty07_18-1719193501078.png" style="width: 400px;"&gt;&lt;img src="https://community.blueprism.com/t5/image/serverpage/image-id/38713iE0DB3445E665C436/image-size/medium/is-moderation-mode/true?v=v2&amp;amp;px=400" role="button" title="devneetmohanty07_18-1719193501078.png" alt="devneetmohanty07_18-1719193501078.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;15) Now, we have our desired data from Power Query transformation with one sheet called '&lt;STRONG&gt;Parameters&lt;/STRONG&gt;' and another called '&lt;STRONG&gt;Final&lt;/STRONG&gt;' which has the comparison results:&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="devneetmohanty07_19-1719193562035.png" style="width: 999px;"&gt;&lt;img src="https://community.blueprism.com/t5/image/serverpage/image-id/38714iB65D39C160B15574/image-size/large/is-moderation-mode/true?v=v2&amp;amp;px=999" role="button" title="devneetmohanty07_19-1719193562035.png" alt="devneetmohanty07_19-1719193562035.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Making Power Query Dynamic:&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;1) Now, we need to make the Power Query file dynamic so that whenever the values are entered in the '&lt;STRONG&gt;Parameters&lt;/STRONG&gt;' sheet, the power query can take those values and use the file paths and sheet names from there. To do this, first open the power query editor by navigating to&amp;nbsp;&lt;STRONG&gt;Data -&amp;gt; Get Data -&amp;gt; Launch Power Query Editor&lt;/STRONG&gt;:&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="devneetmohanty07_2-1719190761499.png" style="width: 400px;"&gt;&lt;img src="https://community.blueprism.com/t5/image/serverpage/image-id/38697i965BABBDADF26316/image-size/medium/is-moderation-mode/true?v=v2&amp;amp;px=400" role="button" title="devneetmohanty07_2-1719190761499.png" alt="devneetmohanty07_2-1719190761499.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;2) Now, select the first table and then we would go to&amp;nbsp;&lt;STRONG&gt;Advanced Editor&lt;/STRONG&gt; option. This will open up the editor window where we will have all the logic related to the Data Transformation steps which in our case include reading the data sources, comparing the columns and at the end producing the desired comparison results:&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="devneetmohanty07_20-1719193786380.png" style="width: 999px;"&gt;&lt;img src="https://community.blueprism.com/t5/image/serverpage/image-id/38715iF942CDBF2FD85A82/image-size/large/is-moderation-mode/true?v=v2&amp;amp;px=999" role="button" title="devneetmohanty07_20-1719193786380.png" alt="devneetmohanty07_20-1719193786380.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;3) In the window, we will see the&amp;nbsp;&lt;STRONG&gt;M-Query&lt;/STRONG&gt; language code behind all the transformation rules. What we need to do is add the below code prior at the very beginning of the entire displayed code:&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Code To Add At Beginning:&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;let
InputFilePath1 = Excel.CurrentWorkbook(){[Name="InputFilePath1"]}[Content]{0}[Column1],
InputSheetName1 = 
Excel.CurrentWorkbook(){[Name="InputSheetName1"]}[Content]{0}[Column1],&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;We simply are declaring our variables here with respect to the named range values that I defined during step 2. Now, when you add these lines, the code will look like this:&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="devneetmohanty07_21-1719194071798.png" style="width: 999px;"&gt;&lt;img src="https://community.blueprism.com/t5/image/serverpage/image-id/38716i62E9319CB36E794C/image-size/large/is-moderation-mode/true?v=v2&amp;amp;px=999" role="button" title="devneetmohanty07_21-1719194071798.png" alt="devneetmohanty07_21-1719194071798.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;Now, the same variable InputFilePath1 and InputSheetName1 we need to use in the next lines where we can see the hardcoded file path and sheet names and click on &lt;STRONG&gt;OK&lt;/STRONG&gt;:&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="devneetmohanty07_25-1719194450534.png" style="width: 400px;"&gt;&lt;img src="https://community.blueprism.com/t5/image/serverpage/image-id/38720iDFF1F7AAABAE60D9/image-size/medium/is-moderation-mode/true?v=v2&amp;amp;px=400" role="button" title="devneetmohanty07_25-1719194450534.png" alt="devneetmohanty07_25-1719194450534.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;4) Now, we will do the same changes in B table with respect to InputFilePath2 and InputSheetName2. Select Table 2 and click on Advanced Editor to add the below code:&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Code To Add At Beginning:&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;let
InputFilePath2 = Excel.CurrentWorkbook(){[Name="InputFilePath2"]}[Content]{0}[Column1],
InputSheetName2 = 
Excel.CurrentWorkbook(){[Name="InputSheetName2"]}[Content]{0}[Column1],&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;We simply are declaring our variables here with respect to the named range values that I defined during step 2. Now, when you add these lines, the code will look like this:&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="devneetmohanty07_23-1719194295173.png" style="width: 400px;"&gt;&lt;img src="https://community.blueprism.com/t5/image/serverpage/image-id/38718i3276FA9BBBD18089/image-size/medium/is-moderation-mode/true?v=v2&amp;amp;px=400" role="button" title="devneetmohanty07_23-1719194295173.png" alt="devneetmohanty07_23-1719194295173.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Now, the same variable InputFilePath2 and InputSheetName2 we need to use in the next line where we can see the hardcoded file path and sheet name and click on &lt;STRONG&gt;OK&lt;/STRONG&gt;:&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="devneetmohanty07_24-1719194386318.png" style="width: 999px;"&gt;&lt;img src="https://community.blueprism.com/t5/image/serverpage/image-id/38719iB4FB4542BF0E5524/image-size/large/is-moderation-mode/true?v=v2&amp;amp;px=999" role="button" title="devneetmohanty07_24-1719194386318.png" alt="devneetmohanty07_24-1719194386318.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;5) You will see errors at this line but do not worry that is expected as we have not mentioned any valeus in the '&lt;STRONG&gt;Parameters&lt;/STRONG&gt;' sheet and now you simply click on&amp;nbsp;&lt;STRONG&gt;Close &amp;amp; Load&lt;/STRONG&gt;:&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="devneetmohanty07_26-1719194553757.png" style="width: 400px;"&gt;&lt;img src="https://community.blueprism.com/t5/image/serverpage/image-id/38721iBC7EA436B687B18F/image-size/medium/is-moderation-mode/true?v=v2&amp;amp;px=400" role="button" title="devneetmohanty07_26-1719194553757.png" alt="devneetmohanty07_26-1719194553757.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Testing Power Query File:&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;1) Now to test if everything is working fine with our file, we can delete the content of &lt;STRONG&gt;Final&amp;nbsp;&lt;/STRONG&gt;sheet and then go to&amp;nbsp;&lt;STRONG&gt;Data -&amp;gt; Refresh All -&amp;gt; Connection Properties&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="devneetmohanty07_28-1719194850193.png" style="width: 400px;"&gt;&lt;img src="https://community.blueprism.com/t5/image/serverpage/image-id/38723i8DA04E9AA47C3C40/image-size/medium/is-moderation-mode/true?v=v2&amp;amp;px=400" role="button" title="devneetmohanty07_28-1719194850193.png" alt="devneetmohanty07_28-1719194850193.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;2) Now, we will disable the option&amp;nbsp;&lt;STRONG&gt;Enable background refresh&lt;/STRONG&gt; and click on&lt;STRONG&gt; OK&amp;nbsp;&lt;/STRONG&gt;button:&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="devneetmohanty07_30-1719194942650.png" style="width: 400px;"&gt;&lt;img src="https://community.blueprism.com/t5/image/serverpage/image-id/38725i075913843929734B/image-size/medium/is-moderation-mode/true?v=v2&amp;amp;px=400" role="button" title="devneetmohanty07_30-1719194942650.png" alt="devneetmohanty07_30-1719194942650.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;This step is mandatory for us as in the next steps we will invoke the power query from Blue Prism and we need this option for it to work.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;3) Now, go back to&amp;nbsp;&lt;STRONG&gt;Parameters &lt;/STRONG&gt;sheet, fill the values accordingly and click on&amp;nbsp;&lt;STRONG&gt;Refresh All&lt;/STRONG&gt; button. You should be able to see the data coming automatically in&amp;nbsp;&lt;STRONG&gt;Final&amp;nbsp;&lt;/STRONG&gt;sheet:&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="devneetmohanty07_31-1719195137171.png" style="width: 999px;"&gt;&lt;img src="https://community.blueprism.com/t5/image/serverpage/image-id/38726iD285789DCFB05B5F/image-size/large/is-moderation-mode/true?v=v2&amp;amp;px=999" role="button" title="devneetmohanty07_31-1719195137171.png" alt="devneetmohanty07_31-1719195137171.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Running Power Query File From Blue Prism:&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;1)&amp;nbsp;Now go to Blue Prism and you can extend the 'MS Excel - VBO' or 'MS Excel -Extended' VBO whichever you wish to extend by creating another action called 'Refresh Power Query Connections' with input parameters as 'handle' (Number), 'workbook' (text) and output parameters as 'Message' (text) and 'Result' (Flag) as shown below:&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="devneetmohanty07_33-1719195298009.png" style="width: 400px;"&gt;&lt;img src="https://community.blueprism.com/t5/image/serverpage/image-id/38728i482B772E7B654B8D/image-size/medium/is-moderation-mode/true?v=v2&amp;amp;px=400" role="button" title="devneetmohanty07_33-1719195298009.png" alt="devneetmohanty07_33-1719195298009.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;2)&amp;nbsp;In the code stage you need to insert the following parameters and the code as shown below:&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="devneetmohanty07_34-1719195363557.png" style="width: 400px;"&gt;&lt;img src="https://community.blueprism.com/t5/image/serverpage/image-id/38729iD7BCA48D5F726272/image-size/medium/is-moderation-mode/true?v=v2&amp;amp;px=400" role="button" title="devneetmohanty07_34-1719195363557.png" alt="devneetmohanty07_34-1719195363557.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="csharp"&gt;Try
 message = ""
 Dim wb as Object = _
 GetWorkBook(handle, workbookname)
 ' Refresh workbook to execute background queries
 wb.RefreshAll
 result = True
Catch ex As Exception
 result = False
 message = ex.Message
End Try&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;3) To run it now, you can simply create a workflow, to copy the Power Query file, enter the parameters using Write Cell actions and then invoke the newly created action as shown above to get results in the &lt;STRONG&gt;Final&amp;nbsp;&lt;/STRONG&gt;sheet of the&amp;nbsp;Power Query file. We are creating a copy of the file since we want a fresh file for every run to ensure data is populated correctly although this is optional.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I mainly prefer Power Query as it is very fast for a large dataset and also easier to maintain as most of the actions are UI based only. Let me know if it helps and I can also share the file if that helps!&lt;/P&gt;</description>
      <pubDate>Mon, 24 Jun 2024 02:20:43 GMT</pubDate>
      <guid>https://community.blueprism.com/t5/Digital-Exchange/compare-columns-data-in-2-sheets-and-update-if-it-matches-which/m-p/111806#M3631</guid>
      <dc:creator>devneetmohanty07</dc:creator>
      <dc:date>2024-06-24T02:20:43Z</dc:date>
    </item>
    <item>
      <title>Re: compare columns data in 2 sheets and update if it matches, which has around 1 lakh data.</title>
      <link>https://community.blueprism.com/t5/Digital-Exchange/compare-columns-data-in-2-sheets-and-update-if-it-matches-which/m-p/111821#M3632</link>
      <description>&lt;P&gt;Thank you&amp;nbsp;&lt;a href="https://community.blueprism.com/t5/user/viewprofilepage/user-id/36564"&gt;@faheemsd&lt;/a&gt;&amp;nbsp;..&lt;/P&gt;</description>
      <pubDate>Tue, 25 Jun 2024 07:46:20 GMT</pubDate>
      <guid>https://community.blueprism.com/t5/Digital-Exchange/compare-columns-data-in-2-sheets-and-update-if-it-matches-which/m-p/111821#M3632</guid>
      <dc:creator>Karthik.choppadandi</dc:creator>
      <dc:date>2024-06-25T07:46:20Z</dc:date>
    </item>
    <item>
      <title>Re: compare columns data in 2 sheets and update if it matches, which has around 1 lakh data.</title>
      <link>https://community.blueprism.com/t5/Digital-Exchange/compare-columns-data-in-2-sheets-and-update-if-it-matches-which/m-p/111822#M3633</link>
      <description>&lt;P&gt;Thank you&amp;nbsp;&lt;a href="https://community.blueprism.com/t5/user/viewprofilepage/user-id/1843"&gt;@devneetmohanty07&lt;/a&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 25 Jun 2024 07:49:54 GMT</pubDate>
      <guid>https://community.blueprism.com/t5/Digital-Exchange/compare-columns-data-in-2-sheets-and-update-if-it-matches-which/m-p/111822#M3633</guid>
      <dc:creator>Karthik.choppadandi</dc:creator>
      <dc:date>2024-06-25T07:49:54Z</dc:date>
    </item>
    <item>
      <title>Re: compare columns data in 2 sheets and update if it matches, which has around 1 lakh data.</title>
      <link>https://community.blueprism.com/t5/Digital-Exchange/compare-columns-data-in-2-sheets-and-update-if-it-matches-which/m-p/112673#M3700</link>
      <description>&lt;P&gt;I just wanted to pop in and say WOW -&amp;nbsp;&lt;a href="https://community.blueprism.com/t5/user/viewprofilepage/user-id/1843"&gt;@devneetmohanty07&lt;/a&gt;&amp;nbsp;and&amp;nbsp;&lt;a href="https://community.blueprism.com/t5/user/viewprofilepage/user-id/36564"&gt;@faheemsd&lt;/a&gt;&amp;nbsp;amazing job! 2 very sound approaches with very clear steps on how to employ them.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;And such a great question&amp;nbsp;&lt;a href="https://community.blueprism.com/t5/user/viewprofilepage/user-id/59284"&gt;@Karthik.choppadandi&lt;/a&gt;&amp;nbsp;- thank you for taking the time to ask. I hope you got what you needed!&lt;/P&gt;
&lt;P&gt;On behalf of the community, thank you so much, great question and incredible answers.&lt;/P&gt;</description>
      <pubDate>Fri, 26 Jul 2024 10:11:52 GMT</pubDate>
      <guid>https://community.blueprism.com/t5/Digital-Exchange/compare-columns-data-in-2-sheets-and-update-if-it-matches-which/m-p/112673#M3700</guid>
      <dc:creator>Michael_S</dc:creator>
      <dc:date>2024-07-26T10:11:52Z</dc:date>
    </item>
  </channel>
</rss>

