<?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: Get only specific columns from Excel worksheet to Collection using Code stage in Product Forum</title>
    <link>https://community.blueprism.com/t5/Product-Forum/Get-only-specific-columns-from-Excel-worksheet-to-Collection/m-p/48139#M3732</link>
    <description>Hi Marina,&lt;BR /&gt;&lt;BR /&gt;There seem to be two things going on:&lt;BR /&gt;
&lt;UL&gt;
&lt;LI&gt;Filtering a collection for a given value:&lt;BR /&gt;This can be easily done by using BP out of the box actions&lt;/LI&gt;
&lt;LI&gt;Selecting only a few columns:&lt;BR /&gt;For the selection of only a few columns I refer to previous threads in this community that handle exactly that and even provide an excellent solution in the form of a Code stage. Obviously, this can also be done by using native BP actions.&lt;/LI&gt;
&lt;/UL&gt;
Note that a few examples of related content are kindly provided by BP in the bottom of this thread.&lt;BR /&gt;&lt;BR /&gt;&lt;A data-tag-text="BPTechTips" data-sign="#" class="user-content-hashtag" href="https://community.blueprism.com/search?s=tags%3A%22BPTechTips%22&amp;amp;executesearch=true" data-tag-key="96c6fa99-5a9a-4919-98a6-d9ce55afe99f"&gt;#BPTechTips&lt;/A&gt;&lt;BR /&gt;As searching this community for me rarely provides what I am looking for, I can recommend searching for whatever you are looking for via your favorite search engine (google in my case), as this is more likely to point to answers related to your question. Just a thought...&lt;BR /&gt;&lt;BR /&gt;------------------------------&lt;BR /&gt;Happy coding!&lt;BR /&gt;Paul&lt;BR /&gt;Sweden&lt;BR /&gt;------------------------------&lt;BR /&gt;</description>
    <pubDate>Mon, 31 Jan 2022 09:01:00 GMT</pubDate>
    <dc:creator>PvD_SE</dc:creator>
    <dc:date>2022-01-31T09:01:00Z</dc:date>
    <item>
      <title>Get only specific columns from Excel worksheet to Collection using Code stage</title>
      <link>https://community.blueprism.com/t5/Product-Forum/Get-only-specific-columns-from-Excel-worksheet-to-Collection/m-p/48131#M3724</link>
      <description>&lt;SPAN&gt;Hi All,&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I need to extend the MS Excel VBO action "Get worksheet as collection"to get only specific columns , which can be specified either as comma separated string or collection. Can you please assist me with the code stage for the same?&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Regards&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;------------------------------&lt;BR /&gt;Sufiya S&lt;BR /&gt;------------------------------&lt;BR /&gt;</description>
      <pubDate>Mon, 06 Apr 2020 16:18:00 GMT</pubDate>
      <guid>https://community.blueprism.com/t5/Product-Forum/Get-only-specific-columns-from-Excel-worksheet-to-Collection/m-p/48131#M3724</guid>
      <dc:creator>SufiyaS</dc:creator>
      <dc:date>2020-04-06T16:18:00Z</dc:date>
    </item>
    <item>
      <title>RE: Get only specific columns from Excel worksheet to Collection using Code stage</title>
      <link>https://community.blueprism.com/t5/Product-Forum/Get-only-specific-columns-from-Excel-worksheet-to-Collection/m-p/48132#M3725</link>
      <description>Hi Sufiya,&amp;nbsp;&lt;BR /&gt;&lt;BR /&gt;You can try reading the entire worksheet to a collection with the MS Excel VBO and then split the collection as an alternative. This mechanism already exists in the 'Split Collection' action of the 'Utility - Collection Manipulation' VBO and works quite well in these cases. This may save you some code writing!&lt;BR /&gt;&lt;BR /&gt;Cheers!&lt;BR /&gt;&lt;BR /&gt;------------------------------&lt;BR /&gt;Jorge Barajas&lt;BR /&gt;Blue Prism&lt;BR /&gt;Senior Product Consultant&lt;BR /&gt;Austin, Texas&lt;BR /&gt;------------------------------&lt;BR /&gt;</description>
      <pubDate>Wed, 15 Apr 2020 16:28:00 GMT</pubDate>
      <guid>https://community.blueprism.com/t5/Product-Forum/Get-only-specific-columns-from-Excel-worksheet-to-Collection/m-p/48132#M3725</guid>
      <dc:creator>jorge.barajas</dc:creator>
      <dc:date>2020-04-15T16:28:00Z</dc:date>
    </item>
    <item>
      <title>RE: Get only specific columns from Excel worksheet to Collection using Code stage</title>
      <link>https://community.blueprism.com/t5/Product-Forum/Get-only-specific-columns-from-Excel-worksheet-to-Collection/m-p/48133#M3726</link>
      <description>In case it's still useful, here's some code I created a while back for this particular issue. After reading data from Excel, you can call this code to select only specific columns.&lt;BR /&gt;&lt;BR /&gt;Inputs:&lt;BR /&gt;Collection In (Collection)&lt;BR /&gt;Column Names (Collection)&lt;BR /&gt;&lt;BR /&gt;Outputs:&lt;BR /&gt;Collection Out (Collection)&lt;BR /&gt;&lt;BR /&gt;
&lt;PRE class="language-markup"&gt;For Each Row As DataRow In Column_Names.Rows
	If Not Collection_In.Columns.Contains(Row(0)) Then
		Throw New Exception("Field '" &amp;amp; Row(0) &amp;amp; "' does not exist in the collection.")
	Else
		Collection_Out.Columns.Add(Collection_In.Columns(Row(0)).ColumnName, Collection_In.Columns(Row(0)).DataType)
	End If
Next

For Each Row As DataRow In Collection_In.Rows
	Dim NewRow As DataRow = Collection_Out.NewRow
	For Each Column As DataColumn In Collection_Out.Columns
		NewRow(Column.ColumnName) = Row(Column.ColumnName)
	Next
	Collection_Out.Rows.Add(NewRow)
Next​&lt;/PRE&gt;
&lt;BR /&gt;Whatever column names are specified in the Column Names collection will be selected.&lt;BR /&gt;&lt;BR /&gt;------------------------------&lt;BR /&gt;Nicholas Zejdlik&lt;BR /&gt;RPA Developer&lt;BR /&gt;------------------------------&lt;BR /&gt;</description>
      <pubDate>Tue, 21 Apr 2020 20:47:00 GMT</pubDate>
      <guid>https://community.blueprism.com/t5/Product-Forum/Get-only-specific-columns-from-Excel-worksheet-to-Collection/m-p/48133#M3726</guid>
      <dc:creator>NicholasZejdlik</dc:creator>
      <dc:date>2020-04-21T20:47:00Z</dc:date>
    </item>
    <item>
      <title>RE: Get only specific columns from Excel worksheet to Collection using Code stage</title>
      <link>https://community.blueprism.com/t5/Product-Forum/Get-only-specific-columns-from-Excel-worksheet-to-Collection/m-p/48134#M3727</link>
      <description>Hi Nicholas,&lt;BR /&gt;&lt;BR /&gt;Thanks a lot for your help!!&lt;BR /&gt;&lt;BR /&gt;I am currently facing some issue with the instance handle&amp;nbsp; though so will fix that and try this out , just wanted to confirm how are the Column names are being specified in the Column Names Collection . It is a single column in Column Names Collection and cell values specify the required columns right?&lt;BR /&gt;&lt;BR /&gt;A screenshot for how Column Names Collection looks would help .&lt;BR /&gt;&lt;BR /&gt;Regards&lt;BR /&gt;&lt;BR /&gt;------------------------------&lt;BR /&gt;SHaikh&lt;BR /&gt;------------------------------&lt;BR /&gt;</description>
      <pubDate>Wed, 22 Apr 2020 06:10:00 GMT</pubDate>
      <guid>https://community.blueprism.com/t5/Product-Forum/Get-only-specific-columns-from-Excel-worksheet-to-Collection/m-p/48134#M3727</guid>
      <dc:creator>SHaikh</dc:creator>
      <dc:date>2020-04-22T06:10:00Z</dc:date>
    </item>
    <item>
      <title>RE: Get only specific columns from Excel worksheet to Collection using Code stage</title>
      <link>https://community.blueprism.com/t5/Product-Forum/Get-only-specific-columns-from-Excel-worksheet-to-Collection/m-p/48135#M3728</link>
      <description>&lt;DIV class="media" style="overflow: hidden; zoom: 1;"&gt;&lt;SPAN&gt;&amp;gt; It is a single column in Column Names Collection and cell values specify the required columns right?&lt;BR /&gt;&lt;BR /&gt;&lt;/SPAN&gt;You got it! Since the code uses For Each over the Column Names collection, and refers to the values using Row(0), it'll grab whichever column names are in the first column of the collection, and each row would correspond to a different column name:&lt;BR /&gt;&lt;span class="lia-inline-image-display-wrapper" image-alt="29967.png"&gt;&lt;img src="https://community.blueprism.com/t5/image/serverpage/image-id/30096i28FF81B8F6CDCF01/image-size/large?v=v2&amp;amp;px=999" role="button" title="29967.png" alt="29967.png" /&gt;&lt;/span&gt;&lt;/DIV&gt;&lt;BR /&gt;&lt;BR /&gt;------------------------------&lt;BR /&gt;Nicholas Zejdlik&lt;BR /&gt;RPA Developer&lt;BR /&gt;------------------------------&lt;BR /&gt;</description>
      <pubDate>Wed, 22 Apr 2020 13:00:00 GMT</pubDate>
      <guid>https://community.blueprism.com/t5/Product-Forum/Get-only-specific-columns-from-Excel-worksheet-to-Collection/m-p/48135#M3728</guid>
      <dc:creator>NicholasZejdlik</dc:creator>
      <dc:date>2020-04-22T13:00:00Z</dc:date>
    </item>
    <item>
      <title>RE: Get only specific columns from Excel worksheet to Collection using Code stage</title>
      <link>https://community.blueprism.com/t5/Product-Forum/Get-only-specific-columns-from-Excel-worksheet-to-Collection/m-p/48136#M3729</link>
      <description>Thank you Nicholas for your help !!!!&amp;nbsp; &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;&lt;BR /&gt;&lt;BR /&gt;------------------------------&lt;BR /&gt;SHaikh&lt;BR /&gt;------------------------------&lt;BR /&gt;</description>
      <pubDate>Fri, 24 Apr 2020 05:52:00 GMT</pubDate>
      <guid>https://community.blueprism.com/t5/Product-Forum/Get-only-specific-columns-from-Excel-worksheet-to-Collection/m-p/48136#M3729</guid>
      <dc:creator>SHaikh</dc:creator>
      <dc:date>2020-04-24T05:52:00Z</dc:date>
    </item>
    <item>
      <title>RE: Get only specific columns from Excel worksheet to Collection using Code stage</title>
      <link>https://community.blueprism.com/t5/Product-Forum/Get-only-specific-columns-from-Excel-worksheet-to-Collection/m-p/48137#M3730</link>
      <description />
      <pubDate>Tue, 09 Mar 2021 12:24:00 GMT</pubDate>
      <guid>https://community.blueprism.com/t5/Product-Forum/Get-only-specific-columns-from-Excel-worksheet-to-Collection/m-p/48137#M3730</guid>
      <dc:creator>BoluwatifeEfuwa</dc:creator>
      <dc:date>2021-03-09T12:24:00Z</dc:date>
    </item>
    <item>
      <title>RE: Get only specific columns from Excel worksheet to Collection using Code stage</title>
      <link>https://community.blueprism.com/t5/Product-Forum/Get-only-specific-columns-from-Excel-worksheet-to-Collection/m-p/48138#M3731</link>
      <description>Hi Nicolas,&lt;BR /&gt;&lt;BR /&gt;Kindly can you help me in how to select the columns B,C,D,E,F after filtering AC column with @ symbol.&lt;BR /&gt;&lt;BR /&gt;&lt;span class="lia-inline-image-display-wrapper" image-alt="29969.png"&gt;&lt;img src="https://community.blueprism.com/t5/image/serverpage/image-id/30098iAEF24D1BCA9C69EC/image-size/large?v=v2&amp;amp;px=999" role="button" title="29969.png" alt="29969.png" /&gt;&lt;/span&gt;​&lt;BR /&gt;&lt;BR /&gt;------------------------------&lt;BR /&gt;Marina Dutta&lt;BR /&gt;------------------------------&lt;BR /&gt;</description>
      <pubDate>Sat, 29 Jan 2022 17:20:00 GMT</pubDate>
      <guid>https://community.blueprism.com/t5/Product-Forum/Get-only-specific-columns-from-Excel-worksheet-to-Collection/m-p/48138#M3731</guid>
      <dc:creator>MarinaDutta</dc:creator>
      <dc:date>2022-01-29T17:20:00Z</dc:date>
    </item>
    <item>
      <title>RE: Get only specific columns from Excel worksheet to Collection using Code stage</title>
      <link>https://community.blueprism.com/t5/Product-Forum/Get-only-specific-columns-from-Excel-worksheet-to-Collection/m-p/48139#M3732</link>
      <description>Hi Marina,&lt;BR /&gt;&lt;BR /&gt;There seem to be two things going on:&lt;BR /&gt;
&lt;UL&gt;
&lt;LI&gt;Filtering a collection for a given value:&lt;BR /&gt;This can be easily done by using BP out of the box actions&lt;/LI&gt;
&lt;LI&gt;Selecting only a few columns:&lt;BR /&gt;For the selection of only a few columns I refer to previous threads in this community that handle exactly that and even provide an excellent solution in the form of a Code stage. Obviously, this can also be done by using native BP actions.&lt;/LI&gt;
&lt;/UL&gt;
Note that a few examples of related content are kindly provided by BP in the bottom of this thread.&lt;BR /&gt;&lt;BR /&gt;&lt;A data-tag-text="BPTechTips" data-sign="#" class="user-content-hashtag" href="https://community.blueprism.com/search?s=tags%3A%22BPTechTips%22&amp;amp;executesearch=true" data-tag-key="96c6fa99-5a9a-4919-98a6-d9ce55afe99f"&gt;#BPTechTips&lt;/A&gt;&lt;BR /&gt;As searching this community for me rarely provides what I am looking for, I can recommend searching for whatever you are looking for via your favorite search engine (google in my case), as this is more likely to point to answers related to your question. Just a thought...&lt;BR /&gt;&lt;BR /&gt;------------------------------&lt;BR /&gt;Happy coding!&lt;BR /&gt;Paul&lt;BR /&gt;Sweden&lt;BR /&gt;------------------------------&lt;BR /&gt;</description>
      <pubDate>Mon, 31 Jan 2022 09:01:00 GMT</pubDate>
      <guid>https://community.blueprism.com/t5/Product-Forum/Get-only-specific-columns-from-Excel-worksheet-to-Collection/m-p/48139#M3732</guid>
      <dc:creator>PvD_SE</dc:creator>
      <dc:date>2022-01-31T09:01:00Z</dc:date>
    </item>
  </channel>
</rss>

