<?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: how To Delete empty columns in collection? in Product Forum</title>
    <link>https://community.blueprism.com/t5/Product-Forum/how-To-Delete-empty-columns-in-collection/m-p/112297#M50330</link>
    <description>&lt;P&gt;I am guessing this issue&amp;nbsp; is solved judging by the age of the post but I solved a similar issue with this Utility.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="whitehouseUoL_0-1720614009290.png" style="width: 400px;"&gt;&lt;img src="https://community.blueprism.com/t5/image/serverpage/image-id/38905i70D5A7B883F50EBF/image-size/medium/is-moderation-mode/true?v=v2&amp;amp;px=400" role="button" title="whitehouseUoL_0-1720614009290.png" alt="whitehouseUoL_0-1720614009290.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Wed, 10 Jul 2024 12:20:52 GMT</pubDate>
    <dc:creator>whitehouse-UoL</dc:creator>
    <dc:date>2024-07-10T12:20:52Z</dc:date>
    <item>
      <title>how To Delete empty columns in collection?</title>
      <link>https://community.blueprism.com/t5/Product-Forum/how-To-Delete-empty-columns-in-collection/m-p/85154#M36193</link>
      <description>&lt;SPAN&gt;I have 500 rows and 150 columns in excel sheet which I am copying into collection (using Get worksheet as collection). Out of 150 columns, around 80 are empty. How should I delete those empty columns? If I use 'delete column' action, it will ask for column name but I want delete all null columns in one go. Please suggest.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;------------------------------&lt;BR /&gt;Hari bp&lt;BR /&gt;------------------------------&lt;BR /&gt;</description>
      <pubDate>Tue, 29 Mar 2022 07:35:00 GMT</pubDate>
      <guid>https://community.blueprism.com/t5/Product-Forum/how-To-Delete-empty-columns-in-collection/m-p/85154#M36193</guid>
      <dc:creator>Haribp</dc:creator>
      <dc:date>2022-03-29T07:35:00Z</dc:date>
    </item>
    <item>
      <title>RE: how To Delete empty columns in collection?</title>
      <link>https://community.blueprism.com/t5/Product-Forum/how-To-Delete-empty-columns-in-collection/m-p/85155#M36194</link>
      <description>Hi H,&lt;BR /&gt;&lt;BR /&gt;I would suggest looking into the OLEDB actions as delivered by BP. It allows you to extract data from an XL and put it into a collection. OLEDB runs a regular SQL statement to define what data needs to be extracted, this allows you to omit empty rows or select rows based on cells with a certain value.&lt;BR /&gt;&lt;BR /&gt;Alternatively, you just read the XL into a collection unsing the regular XL into Collection action, and then run the collection-action to remove empty rows. The regular action to get XL data into a collections has its limitations to the volume of data. But according to a recent post by Eric, a new/extended VBO is available that does handle larger volumes without OutOfMemory errors.&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>Tue, 29 Mar 2022 10:40:00 GMT</pubDate>
      <guid>https://community.blueprism.com/t5/Product-Forum/how-To-Delete-empty-columns-in-collection/m-p/85155#M36194</guid>
      <dc:creator>PvD_SE</dc:creator>
      <dc:date>2022-03-29T10:40:00Z</dc:date>
    </item>
    <item>
      <title>RE: how To Delete empty columns in collection?</title>
      <link>https://community.blueprism.com/t5/Product-Forum/how-To-Delete-empty-columns-in-collection/m-p/85156#M36195</link>
      <description>Try with this-&lt;BR /&gt;&lt;BR /&gt;Open Excel VBO and just for your comfort duplicate &lt;B&gt;'Remove Blank Rows'&lt;/B&gt; action, and rename the action into &lt;B&gt;'Remove Blank columns'&lt;/B&gt;&amp;nbsp; and then open the code stage of the action and replace "Row" with "Column" and "Rows" with "Columns"&lt;BR /&gt;
&lt;PRE class="bbCodeCode" dir="ltr" data-xf-init="code-block" data-lang=""&gt;&lt;CODE&gt;Dim worksheet As Object
worksheet = GetWorkbook(handle,Nothing).ActiveSheet

Const xlCellTypeLastCell As Integer = 11
Dim FirstColumn As Integer = 1
Dim LastColumn As Integer = worksheet.Cells.SpecialCells(xlCellTypeLastCell).Column

For i As Integer = LastColumn To FirstColumn Step -1
    If worksheet.Application.CountA(worksheet.Columns(i)) = 0 Then
        worksheet.Columns(i).Delete
    End If
Next&lt;/CODE&gt;&lt;/PRE&gt;&lt;BR /&gt;&lt;BR /&gt;------------------------------&lt;BR /&gt;Ravi Kumar&lt;BR /&gt;Sr Automation Designer&lt;BR /&gt;Ericsson&lt;BR /&gt;Asia/Kolkata&lt;BR /&gt;------------------------------&lt;BR /&gt;</description>
      <pubDate>Tue, 29 Mar 2022 13:23:00 GMT</pubDate>
      <guid>https://community.blueprism.com/t5/Product-Forum/how-To-Delete-empty-columns-in-collection/m-p/85156#M36195</guid>
      <dc:creator>RaviKumar3</dc:creator>
      <dc:date>2022-03-29T13:23:00Z</dc:date>
    </item>
    <item>
      <title>Re: how To Delete empty columns in collection?</title>
      <link>https://community.blueprism.com/t5/Product-Forum/how-To-Delete-empty-columns-in-collection/m-p/112297#M50330</link>
      <description>&lt;P&gt;I am guessing this issue&amp;nbsp; is solved judging by the age of the post but I solved a similar issue with this Utility.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="whitehouseUoL_0-1720614009290.png" style="width: 400px;"&gt;&lt;img src="https://community.blueprism.com/t5/image/serverpage/image-id/38905i70D5A7B883F50EBF/image-size/medium/is-moderation-mode/true?v=v2&amp;amp;px=400" role="button" title="whitehouseUoL_0-1720614009290.png" alt="whitehouseUoL_0-1720614009290.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 10 Jul 2024 12:20:52 GMT</pubDate>
      <guid>https://community.blueprism.com/t5/Product-Forum/how-To-Delete-empty-columns-in-collection/m-p/112297#M50330</guid>
      <dc:creator>whitehouse-UoL</dc:creator>
      <dc:date>2024-07-10T12:20:52Z</dc:date>
    </item>
  </channel>
</rss>

