<?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: Check if Excel Sheet contains Image in Product Forum</title>
    <link>https://community.blueprism.com/t5/Product-Forum/Check-if-Excel-Sheet-contains-Image/m-p/69809#M22414</link>
    <description>&lt;DIV class="media" style="overflow: hidden; zoom: 1;"&gt;&lt;span class="lia-inline-image-display-wrapper" image-alt="14422.jpg"&gt;&lt;img src="https://community.blueprism.com/t5/image/serverpage/image-id/14589i13A049FF5D4F2FB7/image-size/large?v=v2&amp;amp;px=999" role="button" title="14422.jpg" alt="14422.jpg" /&gt;&lt;/span&gt;
&lt;DIV class="media" style="overflow: hidden; zoom: 1;"&gt;&lt;span class="lia-inline-image-display-wrapper" image-alt="14423.jpg"&gt;&lt;img src="https://community.blueprism.com/t5/image/serverpage/image-id/14585i3D98C74B3801C6B6/image-size/large?v=v2&amp;amp;px=999" role="button" title="14423.jpg" alt="14423.jpg" /&gt;&lt;/span&gt;here you go&lt;/DIV&gt;
&lt;/DIV&gt;&lt;BR /&gt;&lt;BR /&gt;------------------------------&lt;BR /&gt;Robert New&lt;BR /&gt;Senior Mentor / Developer&lt;BR /&gt;Smart Automation Services Limited&lt;BR /&gt;Europe/London&lt;BR /&gt;------------------------------&lt;BR /&gt;</description>
    <pubDate>Thu, 04 Feb 2021 18:06:00 GMT</pubDate>
    <dc:creator>RobertNew</dc:creator>
    <dc:date>2021-02-04T18:06:00Z</dc:date>
    <item>
      <title>Check if Excel Sheet contains Image</title>
      <link>https://community.blueprism.com/t5/Product-Forum/Check-if-Excel-Sheet-contains-Image/m-p/69806#M22411</link>
      <description>Hello Everyone,&lt;BR /&gt;&lt;BR /&gt;Is there a way I can check for Images in the Excel Worksheet.&lt;BR /&gt;&lt;BR /&gt;------------------------------&lt;BR /&gt;Nikhil Negi&lt;BR /&gt;------------------------------&lt;BR /&gt;</description>
      <pubDate>Thu, 04 Feb 2021 12:27:00 GMT</pubDate>
      <guid>https://community.blueprism.com/t5/Product-Forum/Check-if-Excel-Sheet-contains-Image/m-p/69806#M22411</guid>
      <dc:creator>nikhiln</dc:creator>
      <dc:date>2021-02-04T12:27:00Z</dc:date>
    </item>
    <item>
      <title>RE: Check if Excel Sheet contains Image</title>
      <link>https://community.blueprism.com/t5/Product-Forum/Check-if-Excel-Sheet-contains-Image/m-p/69807#M22412</link>
      <description>Hi Nikhil,&amp;nbsp;&lt;BR /&gt;&lt;BR /&gt;you will need to create an action with a code stage and create one yourself, the code below is for saving images from an excel, so have a play with altering it to check.&lt;BR /&gt;&lt;BR /&gt;Dim wb, ws As Object&lt;BR /&gt;Dim excel, sheet, range As Object&lt;BR /&gt;Dim FILEPATH as string&lt;BR /&gt;Dim TempImg as System.Drawing.Image&lt;BR /&gt;Dim sp as Object&lt;BR /&gt;FILEPATH = ""&lt;BR /&gt;dim i as integer&lt;BR /&gt;i = 0&lt;BR /&gt;&lt;BR /&gt;Try&lt;BR /&gt;wb = GetWorkbook(Handle, Workbook)&lt;BR /&gt;ws = GetWorksheet(Handle, Workbook, Worksheet)&lt;BR /&gt;wb.Activate()&lt;BR /&gt;ws.Activate()&lt;BR /&gt;ShapeCount = ws.Shapes.Count&lt;BR /&gt;For Each sp In ws.Shapes&lt;BR /&gt;i = i + 1&lt;BR /&gt;FILEPATH = OutputPath &amp;amp; "Image" &amp;amp; i &amp;amp; ".png"&lt;BR /&gt;currentsh = i&lt;BR /&gt;if ws.Shapes.Item(i).Type = 13 then&lt;BR /&gt;'check if it exists already&lt;BR /&gt;If File.Exists(FILEPATH) = False then&lt;BR /&gt;ws.Shapes.Item(i).Copy&lt;BR /&gt;If Clipboard.ContainsImage Then&lt;BR /&gt;TempImg = Clipboard.GetImage()&lt;BR /&gt;TempImg.Save(FILEPATH,System.Drawing.Imaging.ImageFormat.png) &lt;BR /&gt;Threading.Thread.Sleep(100)&lt;BR /&gt;Clipboard.Clear() &lt;BR /&gt;Threading.Thread.Sleep(100)&lt;BR /&gt;else&lt;BR /&gt;End if&lt;BR /&gt;Else&lt;BR /&gt;End if&lt;BR /&gt;else&lt;BR /&gt;end if&lt;BR /&gt;'Clipboard.Clear()&lt;BR /&gt;&lt;BR /&gt;Next&lt;BR /&gt;Clipboard.Clear()&lt;BR /&gt;Success = true&lt;BR /&gt;&lt;BR /&gt;Catch e As Exception&lt;BR /&gt;Message = e.TargetSite.Tostring &amp;amp; ";" &amp;amp; e.Message &lt;BR /&gt;wb = Nothing&lt;BR /&gt;ws = Nothing&lt;BR /&gt;excel = Nothing&lt;BR /&gt;sheet = Nothing&lt;BR /&gt;range = Nothing&lt;BR /&gt;TempImg = nothing&lt;BR /&gt;Success = False&lt;BR /&gt;End Try&lt;BR /&gt;&lt;BR /&gt;------------------------------&lt;BR /&gt;Robert New&lt;BR /&gt;Senior Mentor / Developer&lt;BR /&gt;Smart Automation Services Limited&lt;BR /&gt;Europe/London&lt;BR /&gt;------------------------------&lt;BR /&gt;</description>
      <pubDate>Thu, 04 Feb 2021 15:41:00 GMT</pubDate>
      <guid>https://community.blueprism.com/t5/Product-Forum/Check-if-Excel-Sheet-contains-Image/m-p/69807#M22412</guid>
      <dc:creator>RobertNew</dc:creator>
      <dc:date>2021-02-04T15:41:00Z</dc:date>
    </item>
    <item>
      <title>RE: Check if Excel Sheet contains Image</title>
      <link>https://community.blueprism.com/t5/Product-Forum/Check-if-Excel-Sheet-contains-Image/m-p/69808#M22413</link>
      <description>Hi Robert,&amp;nbsp;&lt;BR /&gt;Can you also share the input and output parameters for the code stage&lt;BR /&gt;&lt;BR /&gt;------------------------------&lt;BR /&gt;Nikhil Negi&lt;BR /&gt;------------------------------&lt;BR /&gt;</description>
      <pubDate>Thu, 04 Feb 2021 17:27:00 GMT</pubDate>
      <guid>https://community.blueprism.com/t5/Product-Forum/Check-if-Excel-Sheet-contains-Image/m-p/69808#M22413</guid>
      <dc:creator>nikhiln</dc:creator>
      <dc:date>2021-02-04T17:27:00Z</dc:date>
    </item>
    <item>
      <title>RE: Check if Excel Sheet contains Image</title>
      <link>https://community.blueprism.com/t5/Product-Forum/Check-if-Excel-Sheet-contains-Image/m-p/69809#M22414</link>
      <description>&lt;DIV class="media" style="overflow: hidden; zoom: 1;"&gt;&lt;span class="lia-inline-image-display-wrapper" image-alt="14422.jpg"&gt;&lt;img src="https://community.blueprism.com/t5/image/serverpage/image-id/14589i13A049FF5D4F2FB7/image-size/large?v=v2&amp;amp;px=999" role="button" title="14422.jpg" alt="14422.jpg" /&gt;&lt;/span&gt;
&lt;DIV class="media" style="overflow: hidden; zoom: 1;"&gt;&lt;span class="lia-inline-image-display-wrapper" image-alt="14423.jpg"&gt;&lt;img src="https://community.blueprism.com/t5/image/serverpage/image-id/14585i3D98C74B3801C6B6/image-size/large?v=v2&amp;amp;px=999" role="button" title="14423.jpg" alt="14423.jpg" /&gt;&lt;/span&gt;here you go&lt;/DIV&gt;
&lt;/DIV&gt;&lt;BR /&gt;&lt;BR /&gt;------------------------------&lt;BR /&gt;Robert New&lt;BR /&gt;Senior Mentor / Developer&lt;BR /&gt;Smart Automation Services Limited&lt;BR /&gt;Europe/London&lt;BR /&gt;------------------------------&lt;BR /&gt;</description>
      <pubDate>Thu, 04 Feb 2021 18:06:00 GMT</pubDate>
      <guid>https://community.blueprism.com/t5/Product-Forum/Check-if-Excel-Sheet-contains-Image/m-p/69809#M22414</guid>
      <dc:creator>RobertNew</dc:creator>
      <dc:date>2021-02-04T18:06:00Z</dc:date>
    </item>
    <item>
      <title>RE: Check if Excel Sheet contains Image</title>
      <link>https://community.blueprism.com/t5/Product-Forum/Check-if-Excel-Sheet-contains-Image/m-p/69810#M22415</link>
      <description>Unable to find the image.&lt;BR /&gt;Here is the screen shot of VBO&lt;BR /&gt;&lt;BR /&gt;This is the message output after running the code&lt;BR /&gt;Message: TValue get_Item(TKey);The given key was not present in the dictionary.&lt;BR /&gt;&lt;BR /&gt;------------------------------&lt;BR /&gt;Nikhil Negi&lt;BR /&gt;------------------------------&lt;BR /&gt;</description>
      <pubDate>Thu, 04 Feb 2021 21:21:00 GMT</pubDate>
      <guid>https://community.blueprism.com/t5/Product-Forum/Check-if-Excel-Sheet-contains-Image/m-p/69810#M22415</guid>
      <dc:creator>nikhiln</dc:creator>
      <dc:date>2021-02-04T21:21:00Z</dc:date>
    </item>
    <item>
      <title>RE: Check if Excel Sheet contains Image</title>
      <link>https://community.blueprism.com/t5/Product-Forum/Check-if-Excel-Sheet-contains-Image/m-p/69811#M22416</link>
      <description>&lt;DIV class="media" style="overflow: hidden; zoom: 1;"&gt;you will need to make sure the following are in the initialise stage. I can't actually remember where I got the imports for it, so after this you will just have to play with it, sorry.&lt;BR /&gt;&lt;span class="lia-inline-image-display-wrapper" image-alt="14429.jpg"&gt;&lt;img src="https://community.blueprism.com/t5/image/serverpage/image-id/14594iB17286B28D2CDE65/image-size/large?v=v2&amp;amp;px=999" role="button" title="14429.jpg" alt="14429.jpg" /&gt;&lt;/span&gt;&lt;/DIV&gt;&lt;BR /&gt;&lt;BR /&gt;------------------------------&lt;BR /&gt;Robert New&lt;BR /&gt;Senior Mentor / Developer&lt;BR /&gt;Smart Automation Services Limited&lt;BR /&gt;Europe/London&lt;BR /&gt;------------------------------&lt;BR /&gt;</description>
      <pubDate>Thu, 04 Feb 2021 21:34:00 GMT</pubDate>
      <guid>https://community.blueprism.com/t5/Product-Forum/Check-if-Excel-Sheet-contains-Image/m-p/69811#M22416</guid>
      <dc:creator>RobertNew</dc:creator>
      <dc:date>2021-02-04T21:34:00Z</dc:date>
    </item>
    <item>
      <title>RE: Check if Excel Sheet contains Image</title>
      <link>https://community.blueprism.com/t5/Product-Forum/Check-if-Excel-Sheet-contains-Image/m-p/69812#M22417</link>
      <description>All the References and Namespace are there in the VBO by default, still I can't see any results&lt;BR /&gt;&lt;BR /&gt;------------------------------&lt;BR /&gt;Nikhil Negi&lt;BR /&gt;------------------------------&lt;BR /&gt;</description>
      <pubDate>Thu, 04 Feb 2021 22:00:00 GMT</pubDate>
      <guid>https://community.blueprism.com/t5/Product-Forum/Check-if-Excel-Sheet-contains-Image/m-p/69812#M22417</guid>
      <dc:creator>nikhiln</dc:creator>
      <dc:date>2021-02-04T22:00:00Z</dc:date>
    </item>
    <item>
      <title>RE: Check if Excel Sheet contains Image</title>
      <link>https://community.blueprism.com/t5/Product-Forum/Check-if-Excel-Sheet-contains-Image/m-p/69813#M22418</link>
      <description>Hi Nikhil&lt;BR /&gt;&lt;BR /&gt;If you just need to know if an image exists I previously created a vbo to list all images and output the names in a collection then i just loop the collection to see if the image name I want is listed. The code is below:&lt;BR /&gt;&lt;BR /&gt;Dim wb, ws, excel, sheet As Object&lt;BR /&gt;&lt;BR /&gt;wb = GetWorkbook(Handle, Workbook)&lt;BR /&gt;ws = GetWorksheet(Handle, Workbook, Worksheet)&lt;BR /&gt;&lt;BR /&gt;wb.Activate()&lt;BR /&gt;ws.Activate()&lt;BR /&gt;&lt;BR /&gt;excel = ws.Application&lt;BR /&gt;sheet = excel.ActiveSheet&lt;BR /&gt;&lt;BR /&gt;Dim Table As New DataTable&lt;BR /&gt;Table.Columns.Add("Name", GetType(String))&lt;BR /&gt;&lt;BR /&gt;Dim image as Object&lt;BR /&gt;&lt;BR /&gt;For Each image In wb.Worksheets(Worksheet).Shapes&lt;BR /&gt;Table.Rows.Add(image.Name)&lt;BR /&gt;Next&lt;BR /&gt;&lt;BR /&gt;Images = Table&lt;BR /&gt;-----------------------&lt;BR /&gt;&lt;BR /&gt;Inputs:&lt;BR /&gt;Handle&lt;BR /&gt;Workbook&lt;BR /&gt;Worksheet&lt;BR /&gt;&lt;BR /&gt;Outputs:&lt;BR /&gt;Images&lt;BR /&gt;&lt;BR /&gt;Hope this helps &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;&lt;BR /&gt;&lt;BR /&gt;------------------------------&lt;BR /&gt;Michael ONeil&lt;BR /&gt;Technical Lead developer&lt;BR /&gt;Everis Consultancy&lt;BR /&gt;Europe/London&lt;BR /&gt;------------------------------&lt;BR /&gt;</description>
      <pubDate>Fri, 05 Feb 2021 09:25:00 GMT</pubDate>
      <guid>https://community.blueprism.com/t5/Product-Forum/Check-if-Excel-Sheet-contains-Image/m-p/69813#M22418</guid>
      <dc:creator>michaeloneil</dc:creator>
      <dc:date>2021-02-05T09:25:00Z</dc:date>
    </item>
    <item>
      <title>RE: Check if Excel Sheet contains Image</title>
      <link>https://community.blueprism.com/t5/Product-Forum/Check-if-Excel-Sheet-contains-Image/m-p/69814#M22419</link>
      <description>Hi Michael,&lt;BR /&gt;Thanks for the solution.&lt;BR /&gt;This is the error message i get when running the VBO&lt;BR /&gt;&lt;BR /&gt;Internal : Could not execute code stage because exception thrown by code stage: The given key was not present in the dictionary.&lt;BR /&gt;&lt;BR /&gt;------------------------------&lt;BR /&gt;Nikhil Negi&lt;BR /&gt;------------------------------&lt;BR /&gt;</description>
      <pubDate>Fri, 05 Feb 2021 09:38:00 GMT</pubDate>
      <guid>https://community.blueprism.com/t5/Product-Forum/Check-if-Excel-Sheet-contains-Image/m-p/69814#M22419</guid>
      <dc:creator>nikhiln</dc:creator>
      <dc:date>2021-02-05T09:38:00Z</dc:date>
    </item>
    <item>
      <title>RE: Check if Excel Sheet contains Image</title>
      <link>https://community.blueprism.com/t5/Product-Forum/Check-if-Excel-Sheet-contains-Image/m-p/69815#M22420</link>
      <description>Hi&lt;BR /&gt;&lt;BR /&gt;The error you are getting is because the handle you are passing in isnt recognised in the vbo. The new action you have created to get the images did you create this as a single object or did you add this as an action in the existing Ms Excel object? If you have created it as a single object then the handle cant be passed in you need to create this in the same object you are using to create the instance and open the file.&lt;BR /&gt;&lt;BR /&gt;------------------------------&lt;BR /&gt;Michael ONeil&lt;BR /&gt;Technical Lead developer&lt;BR /&gt;Everis Consultancy&lt;BR /&gt;Europe/London&lt;BR /&gt;------------------------------&lt;BR /&gt;</description>
      <pubDate>Fri, 05 Feb 2021 11:12:00 GMT</pubDate>
      <guid>https://community.blueprism.com/t5/Product-Forum/Check-if-Excel-Sheet-contains-Image/m-p/69815#M22420</guid>
      <dc:creator>michaeloneil</dc:creator>
      <dc:date>2021-02-05T11:12:00Z</dc:date>
    </item>
    <item>
      <title>RE: Check if Excel Sheet contains Image</title>
      <link>https://community.blueprism.com/t5/Product-Forum/Check-if-Excel-Sheet-contains-Image/m-p/69816#M22421</link>
      <description>Thanks Michael for your suggestion&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;------------------------------&lt;BR /&gt;Nikhil Negi&lt;BR /&gt;------------------------------&lt;BR /&gt;</description>
      <pubDate>Fri, 05 Feb 2021 12:34:00 GMT</pubDate>
      <guid>https://community.blueprism.com/t5/Product-Forum/Check-if-Excel-Sheet-contains-Image/m-p/69816#M22421</guid>
      <dc:creator>nikhiln</dc:creator>
      <dc:date>2021-02-05T12:34:00Z</dc:date>
    </item>
    <item>
      <title>RE: Check if Excel Sheet contains Image</title>
      <link>https://community.blueprism.com/t5/Product-Forum/Check-if-Excel-Sheet-contains-Image/m-p/69817#M22422</link>
      <description>Hi Michael,&lt;BR /&gt;In my case The Output collection is huge and the process is taking a lot of time to find the image.&lt;BR /&gt;Is there a way I can look for an image in specific cell Range?&lt;BR /&gt;&lt;BR /&gt;Thank you&lt;BR /&gt;&lt;BR /&gt;------------------------------&lt;BR /&gt;Nikhil Negi&lt;BR /&gt;------------------------------&lt;BR /&gt;</description>
      <pubDate>Fri, 12 Feb 2021 16:57:00 GMT</pubDate>
      <guid>https://community.blueprism.com/t5/Product-Forum/Check-if-Excel-Sheet-contains-Image/m-p/69817#M22422</guid>
      <dc:creator>nikhiln</dc:creator>
      <dc:date>2021-02-12T16:57:00Z</dc:date>
    </item>
    <item>
      <title>RE: Check if Excel Sheet contains Image</title>
      <link>https://community.blueprism.com/t5/Product-Forum/Check-if-Excel-Sheet-contains-Image/m-p/69818#M22423</link>
      <description>I would think it should be possible although you must have a very large number of images in your excel file if its taking that long to get them. It should only take a matter of seconds. You would need to amend the original code to get a range instead of just from a worksheet. You will need to add in range as an input and the part of the code getting the images would need to change to something like below. Note my_range is just the example input name.&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;For Each image In wb.Worksheets(Worksheet).Range(my_range).Shapes&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Table.Rows.Add(image.Name)&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Next&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;------------------------------&lt;BR /&gt;Michael ONeil&lt;BR /&gt;Technical Lead developer&lt;BR /&gt;Everis Consultancy&lt;BR /&gt;Europe/London&lt;BR /&gt;------------------------------&lt;BR /&gt;</description>
      <pubDate>Tue, 16 Feb 2021 17:35:00 GMT</pubDate>
      <guid>https://community.blueprism.com/t5/Product-Forum/Check-if-Excel-Sheet-contains-Image/m-p/69818#M22423</guid>
      <dc:creator>michaeloneil</dc:creator>
      <dc:date>2021-02-16T17:35:00Z</dc:date>
    </item>
  </channel>
</rss>

