<?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: Duplicate column names are values in the excel file in Product Forum</title>
    <link>https://community.blueprism.com/t5/Product-Forum/Duplicate-column-names-are-values-in-the-excel-file/m-p/53661#M8300</link>
    <description>&lt;a href="https://community.blueprism.com/t5/user/viewprofilepage/user-id/40647"&gt;@Ravig&lt;/a&gt;&lt;BR /&gt;&lt;BR /&gt;Hi Ravi,&lt;BR /&gt;&lt;BR /&gt;I have faced the same issue recently and found a way to resolve that to handle blank or duplicate ​column with excel.&lt;BR /&gt;&lt;BR /&gt;Just modify or create the "Set Columns Name From First Row" Action on Collection Manipulation Object with the below code:&lt;BR /&gt;&lt;BR /&gt;Dim iThisColumn as integer = -1&lt;BR /&gt;Dim ColumnNameString as string =""&lt;BR /&gt;For Each Column As DataColumn In Input_Collection.Columns&lt;BR /&gt;iThisColumn +=1&lt;BR /&gt;If(CStr(Input_Collection.Rows.Item(0).Item(iThisColumn))="")&lt;BR /&gt;Column.ColumnName="Column" &amp;amp; iThisColumn&lt;BR /&gt;Else if(ColumnNameString.Contains("*" &amp;amp; CStr(Input_Collection.Rows.Item(0).Item(iThisColumn)) &amp;amp; "*"))&lt;BR /&gt;Column.ColumnName = CStr(Input_Collection.Rows.Item(0).Item(iThisColumn)) &amp;amp; iThisColumn&lt;BR /&gt;Else&lt;BR /&gt;Column.ColumnName=CStr(Input_Collection.Rows.Item(0).Item(iThisColumn))&lt;BR /&gt;End If&lt;BR /&gt;ColumnNameString =ColumnNameString &amp;amp; "*" &amp;amp; CStr(Input_Collection.Rows.Item(0).Item(iThisColumn)) &amp;amp; "*"&lt;BR /&gt;Next&lt;BR /&gt;Output_Collection = Input_Collection&lt;BR /&gt;&lt;BR /&gt;Let me know if this helps.&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;​&lt;BR /&gt;&lt;BR /&gt;------------------------------&lt;BR /&gt;Arghya Bhattacharyya&lt;BR /&gt;Senior Consultant&lt;BR /&gt;Asia/Kolkata&lt;BR /&gt;------------------------------&lt;BR /&gt;</description>
    <pubDate>Wed, 24 Aug 2022 16:39:00 GMT</pubDate>
    <dc:creator>arghya.b</dc:creator>
    <dc:date>2022-08-24T16:39:00Z</dc:date>
    <item>
      <title>Duplicate column names are values in the excel file</title>
      <link>https://community.blueprism.com/t5/Product-Forum/Duplicate-column-names-are-values-in-the-excel-file/m-p/53656#M8295</link>
      <description>Hi All,&lt;BR /&gt;&lt;BR /&gt;Please help me out..&lt;BR /&gt;Duplicate column names and values in the excel file&lt;BR /&gt;&lt;BR /&gt;I am downloading one excel file from website this file has duplicate column names and values. When tried to get into in collection getting an error as below.&lt;BR /&gt;&lt;span class="lia-inline-image-display-wrapper" image-alt="16788.png"&gt;&lt;img src="https://community.blueprism.com/t5/image/serverpage/image-id/16942iC3E328489A445471/image-size/large?v=v2&amp;amp;px=999" role="button" title="16788.png" alt="16788.png" /&gt;&lt;/span&gt;I have checked there no object available to identity the duplicate column. I have tried in code stage using VB script no luck please help on this.&lt;BR /&gt;&lt;BR /&gt;Error at code stage&lt;BR /&gt;&lt;STRONG&gt;&lt;span class="lia-inline-image-display-wrapper" image-alt="16789.png"&gt;&lt;img src="https://community.blueprism.com/t5/image/serverpage/image-id/16944i14B5B3E1BBD120F6/image-size/large?v=v2&amp;amp;px=999" role="button" title="16789.png" alt="16789.png" /&gt;&lt;/span&gt;&lt;/STRONG&gt;&lt;BR /&gt;Code:&lt;BR /&gt;&lt;span class="lia-inline-image-display-wrapper" image-alt="16790.png"&gt;&lt;img src="https://community.blueprism.com/t5/image/serverpage/image-id/16946iAD4E2AC218744A31/image-size/large?v=v2&amp;amp;px=999" role="button" title="16790.png" alt="16790.png" /&gt;&lt;/span&gt;Global references&lt;BR /&gt;&lt;span class="lia-inline-image-display-wrapper" image-alt="16791.png"&gt;&lt;img src="https://community.blueprism.com/t5/image/serverpage/image-id/16945iB5C50F4A639D2441/image-size/large?v=v2&amp;amp;px=999" role="button" title="16791.png" alt="16791.png" /&gt;&lt;/span&gt;Global code references&lt;BR /&gt;&lt;span class="lia-inline-image-display-wrapper" image-alt="16792.png"&gt;&lt;img src="https://community.blueprism.com/t5/image/serverpage/image-id/16950i479100605D47B1BB/image-size/large?v=v2&amp;amp;px=999" role="button" title="16792.png" alt="16792.png" /&gt;&lt;/span&gt;&lt;BR /&gt;&lt;BR /&gt;Or this there any other possibilities please let me know.&lt;BR /&gt;&lt;BR /&gt;------------------------------&lt;BR /&gt;Ravi g&lt;BR /&gt;------------------------------</description>
      <pubDate>Tue, 09 Aug 2022 10:51:00 GMT</pubDate>
      <guid>https://community.blueprism.com/t5/Product-Forum/Duplicate-column-names-are-values-in-the-excel-file/m-p/53656#M8295</guid>
      <dc:creator>Ravig</dc:creator>
      <dc:date>2022-08-09T10:51:00Z</dc:date>
    </item>
    <item>
      <title>RE: Duplicate column names are values in the excel file</title>
      <link>https://community.blueprism.com/t5/Product-Forum/Duplicate-column-names-are-values-in-the-excel-file/m-p/53657#M8296</link>
      <description>Hi Ravi,&lt;BR /&gt;&lt;BR /&gt;Ideally if you try to read this data into a collection directly using any VBO, you always will face this issue. My recommendation here would be to get the list of all the header rows from excel. You can use a logic to iterate cells in first row and keep appending values to a collection till you find an empty cell. Then based on those values you can identify which values are duplicate in your case, get the index of those rows and based on that you can update the header name. If lets say you got fourth row as a duplicate which has the value PO#, update the cell 'A4' with the same value suffixed by some identifier like&amp;nbsp; '_1' which should be 'PO#_1'&lt;BR /&gt;&lt;BR /&gt;------------------------------&lt;BR /&gt;----------------------------------&lt;BR /&gt;Hope it helps you out and if my solution resolves your query, then please mark it as the 'Best Answer' so that the others members in the community having similar problem statement can track the answer easily in future&lt;BR /&gt;&lt;BR /&gt;Regards,&lt;BR /&gt;Devneet Mohanty&lt;BR /&gt;Intelligent Process Automation Consultant | Sr. Consultant - Automation Developer,&lt;BR /&gt;WonderBotz India Pvt. Ltd.&lt;BR /&gt;Blue Prism Community MVP | Blue Prism 7x Certified Professional&lt;BR /&gt;Website: &lt;A href="https://devneet.github.io/" target="test_blank"&gt;https://devneet.github.io/&lt;/A&gt;&lt;BR /&gt;Email: devneetmohanty07@gmail.com&lt;BR /&gt;&lt;BR /&gt;----------------------------------&lt;BR /&gt;------------------------------&lt;BR /&gt;</description>
      <pubDate>Tue, 09 Aug 2022 11:38:00 GMT</pubDate>
      <guid>https://community.blueprism.com/t5/Product-Forum/Duplicate-column-names-are-values-in-the-excel-file/m-p/53657#M8296</guid>
      <dc:creator>devneetmohanty07</dc:creator>
      <dc:date>2022-08-09T11:38:00Z</dc:date>
    </item>
    <item>
      <title>RE: Duplicate column names are values in the excel file</title>
      <link>https://community.blueprism.com/t5/Product-Forum/Duplicate-column-names-are-values-in-the-excel-file/m-p/53658#M8297</link>
      <description>Hi Ravi, how are you? Well you can run the macro to remove the duplicate columns before opening with the collection, what do you think of that?&lt;BR /&gt;&lt;BR /&gt;------------------------------&lt;BR /&gt;Emerson Ferreira&lt;BR /&gt;Cons, Intelligent automation&lt;BR /&gt;Avanade Brasil&lt;BR /&gt;Recife&lt;BR /&gt;+5581988869544&lt;BR /&gt;If my answer helped you? Mark as useful!&lt;BR /&gt;------------------------------&lt;BR /&gt;</description>
      <pubDate>Tue, 09 Aug 2022 11:38:00 GMT</pubDate>
      <guid>https://community.blueprism.com/t5/Product-Forum/Duplicate-column-names-are-values-in-the-excel-file/m-p/53658#M8297</guid>
      <dc:creator>EmersonF</dc:creator>
      <dc:date>2022-08-09T11:38:00Z</dc:date>
    </item>
    <item>
      <title>RE: Duplicate column names are values in the excel file</title>
      <link>https://community.blueprism.com/t5/Product-Forum/Duplicate-column-names-are-values-in-the-excel-file/m-p/53659#M8298</link>
      <description>Hi Mohanty,&lt;BR /&gt;&lt;BR /&gt;Thanks for update.&lt;BR /&gt;&lt;BR /&gt;Here not only header duplicate and values of column also duplicate.&lt;BR /&gt;here is example screenshot&lt;BR /&gt;&lt;span class="lia-inline-image-display-wrapper" image-alt="16768.png"&gt;&lt;img src="https://community.blueprism.com/t5/image/serverpage/image-id/16923iFD1544D95CC98DB0/image-size/large?v=v2&amp;amp;px=999" role="button" title="16768.png" alt="16768.png" /&gt;&lt;/span&gt;&lt;BR /&gt;&lt;BR /&gt;------------------------------&lt;BR /&gt;Ravi g&lt;BR /&gt;------------------------------&lt;BR /&gt;</description>
      <pubDate>Tue, 09 Aug 2022 11:58:00 GMT</pubDate>
      <guid>https://community.blueprism.com/t5/Product-Forum/Duplicate-column-names-are-values-in-the-excel-file/m-p/53659#M8298</guid>
      <dc:creator>Ravig</dc:creator>
      <dc:date>2022-08-09T11:58:00Z</dc:date>
    </item>
    <item>
      <title>RE: Duplicate column names are values in the excel file</title>
      <link>https://community.blueprism.com/t5/Product-Forum/Duplicate-column-names-are-values-in-the-excel-file/m-p/53660#M8299</link>
      <description>Hi &lt;SPAN&gt;Ferreira,&lt;BR /&gt;&lt;BR /&gt;I am fine thank you.. and you?&lt;BR /&gt;Thanks for reply.&lt;BR /&gt;&lt;BR /&gt;Yes correct.&lt;BR /&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;------------------------------&lt;BR /&gt;Ravi g&lt;BR /&gt;------------------------------&lt;BR /&gt;</description>
      <pubDate>Tue, 09 Aug 2022 12:00:00 GMT</pubDate>
      <guid>https://community.blueprism.com/t5/Product-Forum/Duplicate-column-names-are-values-in-the-excel-file/m-p/53660#M8299</guid>
      <dc:creator>Ravig</dc:creator>
      <dc:date>2022-08-09T12:00:00Z</dc:date>
    </item>
    <item>
      <title>RE: Duplicate column names are values in the excel file</title>
      <link>https://community.blueprism.com/t5/Product-Forum/Duplicate-column-names-are-values-in-the-excel-file/m-p/53661#M8300</link>
      <description>&lt;a href="https://community.blueprism.com/t5/user/viewprofilepage/user-id/40647"&gt;@Ravig&lt;/a&gt;&lt;BR /&gt;&lt;BR /&gt;Hi Ravi,&lt;BR /&gt;&lt;BR /&gt;I have faced the same issue recently and found a way to resolve that to handle blank or duplicate ​column with excel.&lt;BR /&gt;&lt;BR /&gt;Just modify or create the "Set Columns Name From First Row" Action on Collection Manipulation Object with the below code:&lt;BR /&gt;&lt;BR /&gt;Dim iThisColumn as integer = -1&lt;BR /&gt;Dim ColumnNameString as string =""&lt;BR /&gt;For Each Column As DataColumn In Input_Collection.Columns&lt;BR /&gt;iThisColumn +=1&lt;BR /&gt;If(CStr(Input_Collection.Rows.Item(0).Item(iThisColumn))="")&lt;BR /&gt;Column.ColumnName="Column" &amp;amp; iThisColumn&lt;BR /&gt;Else if(ColumnNameString.Contains("*" &amp;amp; CStr(Input_Collection.Rows.Item(0).Item(iThisColumn)) &amp;amp; "*"))&lt;BR /&gt;Column.ColumnName = CStr(Input_Collection.Rows.Item(0).Item(iThisColumn)) &amp;amp; iThisColumn&lt;BR /&gt;Else&lt;BR /&gt;Column.ColumnName=CStr(Input_Collection.Rows.Item(0).Item(iThisColumn))&lt;BR /&gt;End If&lt;BR /&gt;ColumnNameString =ColumnNameString &amp;amp; "*" &amp;amp; CStr(Input_Collection.Rows.Item(0).Item(iThisColumn)) &amp;amp; "*"&lt;BR /&gt;Next&lt;BR /&gt;Output_Collection = Input_Collection&lt;BR /&gt;&lt;BR /&gt;Let me know if this helps.&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;​&lt;BR /&gt;&lt;BR /&gt;------------------------------&lt;BR /&gt;Arghya Bhattacharyya&lt;BR /&gt;Senior Consultant&lt;BR /&gt;Asia/Kolkata&lt;BR /&gt;------------------------------&lt;BR /&gt;</description>
      <pubDate>Wed, 24 Aug 2022 16:39:00 GMT</pubDate>
      <guid>https://community.blueprism.com/t5/Product-Forum/Duplicate-column-names-are-values-in-the-excel-file/m-p/53661#M8300</guid>
      <dc:creator>arghya.b</dc:creator>
      <dc:date>2022-08-24T16:39:00Z</dc:date>
    </item>
  </channel>
</rss>

