<?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: Using GetWorkbook in custom Excel Object in Product Forum</title>
    <link>https://community.blueprism.com/t5/Product-Forum/Using-GetWorkbook-in-custom-Excel-Object/m-p/89430#M39815</link>
    <description>Thank you for your replies! I have managed to create a custom Excel object which includes the filtering feature. However It works well when only a single criteria is used, I am attempting to filter only records that have "Failed" written, or that have blank values in the field of interest using the following code:&lt;BR /&gt;&lt;BR /&gt;
&lt;PRE class="language-csharp"&gt;Dim worksheet &lt;SPAN class="token keyword"&gt;as&lt;/SPAN&gt; Object
Worksheet &lt;SPAN class="token operator"&gt;=&lt;/SPAN&gt; &lt;SPAN class="token function"&gt;GetWorkbook&lt;/SPAN&gt;&lt;SPAN class="token punctuation"&gt;(&lt;/SPAN&gt;handle&lt;SPAN class="token punctuation"&gt;,&lt;/SPAN&gt; Nothing&lt;SPAN class="token punctuation"&gt;)&lt;/SPAN&gt;&lt;SPAN class="token punctuation"&gt;.&lt;/SPAN&gt; ActiveSheet
worksheet&lt;SPAN class="token punctuation"&gt;.&lt;/SPAN&gt;UsedRange&lt;SPAN class="token punctuation"&gt;.&lt;/SPAN&gt;AutoFilter &lt;SPAN class="token punctuation"&gt;(&lt;/SPAN&gt;Field&lt;SPAN class="token punctuation"&gt;:&lt;/SPAN&gt;&lt;SPAN class="token operator"&gt;=&lt;/SPAN&gt; fieldToBeFiltered&lt;SPAN class="token punctuation"&gt;,&lt;/SPAN&gt;  Criteria1&lt;SPAN class="token punctuation"&gt;:&lt;/SPAN&gt;&lt;SPAN class="token operator"&gt;=&lt;/SPAN&gt;criteriaToFilter&lt;SPAN class="token punctuation"&gt;,&lt;/SPAN&gt; Operator&lt;SPAN class="token punctuation"&gt;:&lt;/SPAN&gt;&lt;SPAN class="token operator"&gt;=&lt;/SPAN&gt;&lt;SPAN class="token number"&gt;2&lt;/SPAN&gt;&lt;SPAN class="token punctuation"&gt;,&lt;/SPAN&gt; Criteria2&lt;SPAN class="token punctuation"&gt;:&lt;/SPAN&gt;&lt;SPAN class="token operator"&gt;=&lt;/SPAN&gt;&lt;SPAN class="token string"&gt;"="&lt;/SPAN&gt;&lt;SPAN class="token punctuation"&gt;)&lt;/SPAN&gt;​&lt;/PRE&gt;
&lt;P&gt;However when running the process showing Excel output, only the "Blank" cells are being selected to be filtered:&lt;/P&gt;
&lt;DIV class="media" style="overflow: hidden; zoom: 1;"&gt;&lt;span class="lia-inline-image-display-wrapper" image-alt="19399.png"&gt;&lt;img src="https://community.blueprism.com/t5/image/serverpage/image-id/19549i07F3FB7CCDF3FCB2/image-size/large?v=v2&amp;amp;px=999" role="button" title="19399.png" alt="19399.png" /&gt;&lt;/span&gt;&lt;/DIV&gt;
&lt;BR /&gt;How can I proceed please?&lt;BR /&gt;&lt;BR /&gt;------------------------------&lt;BR /&gt;Jean Luc Farrugia&lt;BR /&gt;------------------------------&lt;BR /&gt;</description>
    <pubDate>Tue, 03 Dec 2019 09:55:00 GMT</pubDate>
    <dc:creator>Jean_LucFarrugi</dc:creator>
    <dc:date>2019-12-03T09:55:00Z</dc:date>
    <item>
      <title>Using GetWorkbook in custom Excel Object</title>
      <link>https://community.blueprism.com/t5/Product-Forum/Using-GetWorkbook-in-custom-Excel-Object/m-p/89427#M39812</link>
      <description>&lt;SPAN style="display: inline !important; float: none; background-color: #ffffff; color: #7a7a7a; cursor: text; font-family: 'Helvetica Neue',Helvetica,Arial,sans-serif; font-size: 14px; font-style: normal; font-variant: normal; font-weight: 400; letter-spacing: normal; orphans: 2; text-align: left; text-decoration: none; text-indent: 0px; text-transform: none; -webkit-text-stroke-width: 0px; white-space: normal; word-spacing: 0px;"&gt;Dear All,&lt;/SPAN&gt;&lt;BR style="box-sizing: border-box; color: #7a7a7a; font-family: &amp;amp;quot; helvetica neue&amp;amp;quot;,helvetica,arial,sans-serif; font-size: 14px; font-style: normal; font-variant: normal; font-weight: 400; letter-spacing: normal; orphans: 2; text-align: left; text-decoration: none; text-indent: 0px; text-transform: none; -webkit-text-stroke-width: 0px; white-space: normal; word-spacing: 0px;" /&gt;&lt;BR style="box-sizing: border-box; color: #7a7a7a; font-family: &amp;amp;quot; helvetica neue&amp;amp;quot;,helvetica,arial,sans-serif; font-size: 14px; font-style: normal; font-variant: normal; font-weight: 400; letter-spacing: normal; orphans: 2; text-align: left; text-decoration: none; text-indent: 0px; text-transform: none; -webkit-text-stroke-width: 0px; white-space: normal; word-spacing: 0px;" /&gt;I would like to create an object which interfaces with Excel, including a stage which uses the following code:&lt;BR style="box-sizing: border-box; color: #7a7a7a; font-family: &amp;amp;quot; helvetica neue&amp;amp;quot;,helvetica,arial,sans-serif; font-size: 14px; font-style: normal; font-variant: normal; font-weight: 400; letter-spacing: normal; orphans: 2; text-align: left; text-decoration: none; text-indent: 0px; text-transform: none; -webkit-text-stroke-width: 0px; white-space: normal; word-spacing: 0px;" /&gt;&lt;BR style="box-sizing: border-box; color: #7a7a7a; font-family: &amp;amp;quot; helvetica neue&amp;amp;quot;,helvetica,arial,sans-serif; font-size: 14px; font-style: normal; font-variant: normal; font-weight: 400; letter-spacing: normal; orphans: 2; text-align: left; text-decoration: none; text-indent: 0px; text-transform: none; -webkit-text-stroke-width: 0px; white-space: normal; word-spacing: 0px;" /&gt;
&lt;PRE class="language-csharp"&gt;Dim worksheet &lt;SPAN class="token keyword"&gt;as&lt;/SPAN&gt; Object
Worksheet &lt;SPAN class="token operator"&gt;=&lt;/SPAN&gt; &lt;SPAN class="token function"&gt;GetWorkbook&lt;/SPAN&gt;&lt;SPAN class="token punctuation"&gt;(&lt;/SPAN&gt;handle&lt;SPAN class="token punctuation"&gt;,&lt;/SPAN&gt; Nothing&lt;SPAN class="token punctuation"&gt;)&lt;/SPAN&gt;&lt;SPAN class="token punctuation"&gt;.&lt;/SPAN&gt; ActiveSheet
worksheet&lt;SPAN class="token punctuation"&gt;.&lt;/SPAN&gt;UsedRange&lt;SPAN class="token punctuation"&gt;.&lt;/SPAN&gt;AutoFilter &lt;SPAN class="token punctuation"&gt;(&lt;/SPAN&gt;Field&lt;SPAN class="token punctuation"&gt;:&lt;/SPAN&gt;&lt;SPAN class="token operator"&gt;=&lt;/SPAN&gt; fieldToBeFiltered&lt;SPAN class="token punctuation"&gt;,&lt;/SPAN&gt; Criteria1&lt;SPAN class="token punctuation"&gt;:&lt;/SPAN&gt;&lt;SPAN class="token operator"&gt;=&lt;/SPAN&gt; criteriaToFilter&lt;SPAN class="token punctuation"&gt;)&lt;/SPAN&gt;​&lt;/PRE&gt;
&lt;SPAN style="background-color: #ffffff; box-sizing: border-box; color: #7a7a7a; font-family: &amp;amp;quot; helvetica neue&amp;amp;quot;,helvetica,arial,sans-serif; font-size: 14px; font-style: normal; font-variant: normal; font-weight: 400; letter-spacing: normal; orphans: 2; text-align: left; text-decoration: none; text-indent: 0px; text-transform: none; -webkit-text-stroke-width: 0px; white-space: normal; word-spacing: 0px;"&gt;&lt;BR /&gt;&lt;BR /&gt;However the compiler is returning an error stating that the GetWorkbook function is not declared. It may be inaccessible due to its protection level.&lt;BR /&gt;&lt;BR /&gt;I had initially used this code within the original Excel VBO which did not result in this error, yet I could not locate the function within this Object, or view the Application Model used...&lt;BR /&gt;&lt;BR /&gt;How can I proceed to use this function in my own custom Excel object please?&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;------------------------------&lt;BR /&gt;Jean Luc Farrugia&lt;BR /&gt;------------------------------&lt;BR /&gt;</description>
      <pubDate>Wed, 27 Nov 2019 13:21:00 GMT</pubDate>
      <guid>https://community.blueprism.com/t5/Product-Forum/Using-GetWorkbook-in-custom-Excel-Object/m-p/89427#M39812</guid>
      <dc:creator>Jean_LucFarrugi</dc:creator>
      <dc:date>2019-11-27T13:21:00Z</dc:date>
    </item>
    <item>
      <title>RE: Using GetWorkbook in custom Excel Object</title>
      <link>https://community.blueprism.com/t5/Product-Forum/Using-GetWorkbook-in-custom-Excel-Object/m-p/89428#M39813</link>
      <description>Hi Jean,&lt;BR /&gt;&lt;BR /&gt;You are encountering this error because, the function &lt;STRONG&gt;GetWorkbook()&lt;/STRONG&gt; is defined in &lt;STRONG&gt;"Global Code"&lt;/STRONG&gt;&amp;nbsp;section of the original MS Excel VBO.&lt;BR /&gt;&lt;BR /&gt;If you want to create your own customized Excel VBO then;&lt;BR /&gt;1. Copy &amp;amp; paste the Global Code from original MS Excel VBO to Global Code section in your object or&lt;BR /&gt;2. Make a copy (Save As) of original MS Excel VBO and amend the changes as your requirement&lt;BR /&gt;&lt;BR /&gt;Hope this will resolve your issue.&lt;BR /&gt;&lt;BR /&gt;------------------------------&lt;BR /&gt;Manoj Dhamrala&lt;BR /&gt;------------------------------&lt;BR /&gt;</description>
      <pubDate>Wed, 27 Nov 2019 13:43:00 GMT</pubDate>
      <guid>https://community.blueprism.com/t5/Product-Forum/Using-GetWorkbook-in-custom-Excel-Object/m-p/89428#M39813</guid>
      <dc:creator>ManojDhamrala</dc:creator>
      <dc:date>2019-11-27T13:43:00Z</dc:date>
    </item>
    <item>
      <title>RE: Using GetWorkbook in custom Excel Object</title>
      <link>https://community.blueprism.com/t5/Product-Forum/Using-GetWorkbook-in-custom-Excel-Object/m-p/89429#M39814</link>
      <description>&lt;P&gt;&lt;BR /&gt;Hi,&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;
&lt;P&gt;Assuming, you tried to build the custom object from scratch. You might have forgot to add the function definition in your global code/ custom code for GetWorkBook.&lt;BR /&gt;&lt;BR /&gt;Here is the code for your reference.&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;
&lt;PRE class="language-csharp"&gt;Protected Function &lt;SPAN class="token function"&gt;GetWorkbook&lt;/SPAN&gt;&lt;SPAN class="token punctuation"&gt;(&lt;/SPAN&gt;Handle As Integer&lt;SPAN class="token punctuation"&gt;,&lt;/SPAN&gt; Name &lt;SPAN class="token keyword"&gt;as&lt;/SPAN&gt; String&lt;SPAN class="token punctuation"&gt;)&lt;/SPAN&gt; As Object

	Dim wb &lt;SPAN class="token keyword"&gt;as&lt;/SPAN&gt; Object &lt;SPAN class="token operator"&gt;=&lt;/SPAN&gt; Nothing
	If String&lt;SPAN class="token punctuation"&gt;.&lt;/SPAN&gt;&lt;SPAN class="token function"&gt;IsNullOrEmpty&lt;/SPAN&gt;&lt;SPAN class="token punctuation"&gt;(&lt;/SPAN&gt;Name&lt;SPAN class="token punctuation"&gt;)&lt;/SPAN&gt; Then
		wb &lt;SPAN class="token operator"&gt;=&lt;/SPAN&gt; &lt;SPAN class="token function"&gt;GetInstance&lt;/SPAN&gt;&lt;SPAN class="token punctuation"&gt;(&lt;/SPAN&gt;Handle&lt;SPAN class="token punctuation"&gt;)&lt;/SPAN&gt;&lt;SPAN class="token punctuation"&gt;.&lt;/SPAN&gt;ActiveWorkbook
		If wb Is Nothing ' We need to create a deafult workbook
			wb &lt;SPAN class="token operator"&gt;=&lt;/SPAN&gt; &lt;SPAN class="token function"&gt;NewWorkbook&lt;/SPAN&gt;&lt;SPAN class="token punctuation"&gt;(&lt;/SPAN&gt;Handle&lt;SPAN class="token punctuation"&gt;)&lt;/SPAN&gt;
		End If
		Return wb
	Else
		Return &lt;SPAN class="token function"&gt;GetInstance&lt;/SPAN&gt;&lt;SPAN class="token punctuation"&gt;(&lt;/SPAN&gt;Handle&lt;SPAN class="token punctuation"&gt;)&lt;/SPAN&gt;&lt;SPAN class="token punctuation"&gt;.&lt;/SPAN&gt;&lt;SPAN class="token function"&gt;Workbooks&lt;/SPAN&gt;&lt;SPAN class="token punctuation"&gt;(&lt;/SPAN&gt;Name&lt;SPAN class="token punctuation"&gt;)&lt;/SPAN&gt;
	End If

End Function&lt;/PRE&gt;
&lt;P&gt;&lt;BR /&gt;Use it inside your code and then it should work.&lt;/P&gt;&lt;BR /&gt;&lt;BR /&gt;------------------------------&lt;BR /&gt;Vivek Goel&lt;BR /&gt;RPA Architect&lt;BR /&gt;Asia/Singapore&lt;BR /&gt;+6594554364&lt;BR /&gt;&lt;A href="https://www.rpatools.com/" target="test_blank"&gt;https://www.rpatools.com/&lt;/A&gt;&lt;BR /&gt;------------------------------&lt;BR /&gt;</description>
      <pubDate>Thu, 28 Nov 2019 08:30:00 GMT</pubDate>
      <guid>https://community.blueprism.com/t5/Product-Forum/Using-GetWorkbook-in-custom-Excel-Object/m-p/89429#M39814</guid>
      <dc:creator>vivek.kumar.goel</dc:creator>
      <dc:date>2019-11-28T08:30:00Z</dc:date>
    </item>
    <item>
      <title>RE: Using GetWorkbook in custom Excel Object</title>
      <link>https://community.blueprism.com/t5/Product-Forum/Using-GetWorkbook-in-custom-Excel-Object/m-p/89430#M39815</link>
      <description>Thank you for your replies! I have managed to create a custom Excel object which includes the filtering feature. However It works well when only a single criteria is used, I am attempting to filter only records that have "Failed" written, or that have blank values in the field of interest using the following code:&lt;BR /&gt;&lt;BR /&gt;
&lt;PRE class="language-csharp"&gt;Dim worksheet &lt;SPAN class="token keyword"&gt;as&lt;/SPAN&gt; Object
Worksheet &lt;SPAN class="token operator"&gt;=&lt;/SPAN&gt; &lt;SPAN class="token function"&gt;GetWorkbook&lt;/SPAN&gt;&lt;SPAN class="token punctuation"&gt;(&lt;/SPAN&gt;handle&lt;SPAN class="token punctuation"&gt;,&lt;/SPAN&gt; Nothing&lt;SPAN class="token punctuation"&gt;)&lt;/SPAN&gt;&lt;SPAN class="token punctuation"&gt;.&lt;/SPAN&gt; ActiveSheet
worksheet&lt;SPAN class="token punctuation"&gt;.&lt;/SPAN&gt;UsedRange&lt;SPAN class="token punctuation"&gt;.&lt;/SPAN&gt;AutoFilter &lt;SPAN class="token punctuation"&gt;(&lt;/SPAN&gt;Field&lt;SPAN class="token punctuation"&gt;:&lt;/SPAN&gt;&lt;SPAN class="token operator"&gt;=&lt;/SPAN&gt; fieldToBeFiltered&lt;SPAN class="token punctuation"&gt;,&lt;/SPAN&gt;  Criteria1&lt;SPAN class="token punctuation"&gt;:&lt;/SPAN&gt;&lt;SPAN class="token operator"&gt;=&lt;/SPAN&gt;criteriaToFilter&lt;SPAN class="token punctuation"&gt;,&lt;/SPAN&gt; Operator&lt;SPAN class="token punctuation"&gt;:&lt;/SPAN&gt;&lt;SPAN class="token operator"&gt;=&lt;/SPAN&gt;&lt;SPAN class="token number"&gt;2&lt;/SPAN&gt;&lt;SPAN class="token punctuation"&gt;,&lt;/SPAN&gt; Criteria2&lt;SPAN class="token punctuation"&gt;:&lt;/SPAN&gt;&lt;SPAN class="token operator"&gt;=&lt;/SPAN&gt;&lt;SPAN class="token string"&gt;"="&lt;/SPAN&gt;&lt;SPAN class="token punctuation"&gt;)&lt;/SPAN&gt;​&lt;/PRE&gt;
&lt;P&gt;However when running the process showing Excel output, only the "Blank" cells are being selected to be filtered:&lt;/P&gt;
&lt;DIV class="media" style="overflow: hidden; zoom: 1;"&gt;&lt;span class="lia-inline-image-display-wrapper" image-alt="19399.png"&gt;&lt;img src="https://community.blueprism.com/t5/image/serverpage/image-id/19549i07F3FB7CCDF3FCB2/image-size/large?v=v2&amp;amp;px=999" role="button" title="19399.png" alt="19399.png" /&gt;&lt;/span&gt;&lt;/DIV&gt;
&lt;BR /&gt;How can I proceed please?&lt;BR /&gt;&lt;BR /&gt;------------------------------&lt;BR /&gt;Jean Luc Farrugia&lt;BR /&gt;------------------------------&lt;BR /&gt;</description>
      <pubDate>Tue, 03 Dec 2019 09:55:00 GMT</pubDate>
      <guid>https://community.blueprism.com/t5/Product-Forum/Using-GetWorkbook-in-custom-Excel-Object/m-p/89430#M39815</guid>
      <dc:creator>Jean_LucFarrugi</dc:creator>
      <dc:date>2019-12-03T09:55:00Z</dc:date>
    </item>
  </channel>
</rss>

