<?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: Excel VBO - Open Workbook with custom parameters in Digital Exchange</title>
    <link>https://community.blueprism.com/t5/Digital-Exchange/Excel-VBO-Open-Workbook-with-custom-parameters/m-p/64278#M2679</link>
    <description>&lt;a href="https://community.blueprism.com/t5/user/viewprofilepage/user-id/937"&gt;@AP.Philippa&lt;/a&gt;, Let me know if this works for you!​&lt;BR /&gt;&lt;BR /&gt;------------------------------&lt;BR /&gt;Emerson Ferreira&lt;BR /&gt;Sr Business Analyst&lt;BR /&gt;Avanade Brasil&lt;BR /&gt;+55 (081) 98886-9544&lt;BR /&gt;------------------------------&lt;BR /&gt;</description>
    <pubDate>Fri, 14 May 2021 14:04:00 GMT</pubDate>
    <dc:creator>EmersonF</dc:creator>
    <dc:date>2021-05-14T14:04:00Z</dc:date>
    <item>
      <title>Excel VBO - Open Workbook with custom parameters</title>
      <link>https://community.blueprism.com/t5/Digital-Exchange/Excel-VBO-Open-Workbook-with-custom-parameters/m-p/64276#M2677</link>
      <description>&lt;P&gt;Dear BP community,&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;
&lt;P&gt;We recently have updated our Excel VBO to the most recent version available on the Blue Prism DX. A great new feature in this version is that the Open Workbook action now appears to have a timeout functionality build into the code (we hope that this will decrease the chance on warning status)!&lt;/P&gt;
&lt;P&gt;We unfortunately seem to be unable to modify the code stage (including the new timeout functionality) in a way that it can use custom parameters, such as password or the updatelinks flag. For example adding the parameter "UpdateLinks:=0" to the code stage, results in a compiler error..&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;
&lt;P&gt;&lt;STRONG&gt;Old code example (UpdateLinks):&lt;/STRONG&gt;&lt;/P&gt;
&lt;P&gt;Dim wb as Object = GetInstance(handle).Workbooks.Open(Filename:=filename, UpdateLinks:=0)&lt;/P&gt;
&lt;P&gt;name = wb.Name&lt;/P&gt;
&lt;P&gt;wb.Activate()&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;
&lt;P&gt;&lt;STRONG&gt;New code attempt:&lt;/STRONG&gt;&lt;/P&gt;
&lt;P&gt;name = ExecWithTimeout(Timeout, "Open Workbook",&lt;/P&gt;
&lt;P&gt;Function()&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; Dim instance = GetInstance(handle)&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; Dim workbooks As object = GetProperty(instance, "Workbooks")&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; Dim wb As Object = Invoke(workbooks, "Open", Filename:=filename, UpdateLinks:=0)&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; Invoke(wb, "Activate")&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; Return wb.Name&lt;/P&gt;
&lt;P&gt;End Function)&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;
&lt;P&gt;Could someone please advise us on how we can modify the Open Workbook code stage in a way that we can use provide custom parameters?&amp;nbsp;&lt;BR /&gt;&lt;BR /&gt;Thanks in advance!&lt;/P&gt;&lt;BR /&gt;&lt;BR /&gt;------------------------------&lt;BR /&gt;Arthur Philippa&lt;BR /&gt;RPA Developer&lt;BR /&gt;Port of Rotterdam&lt;BR /&gt;Europe/Amsterdam&lt;BR /&gt;------------------------------&lt;BR /&gt;</description>
      <pubDate>Fri, 14 May 2021 13:07:00 GMT</pubDate>
      <guid>https://community.blueprism.com/t5/Digital-Exchange/Excel-VBO-Open-Workbook-with-custom-parameters/m-p/64276#M2677</guid>
      <dc:creator>AP.Philippa</dc:creator>
      <dc:date>2021-05-14T13:07:00Z</dc:date>
    </item>
    <item>
      <title>RE: Excel VBO - Open Workbook with custom parameters</title>
      <link>https://community.blueprism.com/t5/Digital-Exchange/Excel-VBO-Open-Workbook-with-custom-parameters/m-p/64277#M2678</link>
      <description>&lt;P&gt;Hi &lt;a href="https://community.blueprism.com/t5/user/viewprofilepage/user-id/937"&gt;@AP.Philippa&lt;/a&gt;, i hope you're well, i can try it?&amp;nbsp;&lt;/P&gt;
&lt;P&gt;This works for me, if this works for you too, please mark it as helpful: D&lt;/P&gt;
&lt;PRE class="language-csharp"&gt;&lt;CODE&gt;name = ExecWithTimeout(Timeout, "Open Workbook",
Function()
    Dim instance = GetInstance(handle)
    Dim workbooks As object = GetProperty(instance, "Workbooks")
    Dim wb As Object = Invoke(workbooks, "Open", {filename, True})
    Invoke(wb, "Activate")
    Return wb.Name
End Function)&lt;/CODE&gt;&lt;/PRE&gt;
&lt;BR /&gt;I did this using the expression syntax as parameter: &lt;CODE&gt;&lt;EM&gt;expression&lt;/EM&gt;&lt;SPAN&gt;.&lt;/SPAN&gt;&lt;STRONG&gt;Open&lt;/STRONG&gt;&lt;SPAN&gt;&amp;nbsp;(&lt;/SPAN&gt;&lt;EM&gt;FileName&lt;/EM&gt;&lt;SPAN&gt;,&amp;nbsp;&lt;/SPAN&gt;&lt;EM&gt;UpdateLinks&lt;/EM&gt;&lt;SPAN&gt;,&amp;nbsp;&lt;/SPAN&gt;&lt;EM&gt;ReadOnly&lt;/EM&gt;&lt;SPAN&gt;,&amp;nbsp;&lt;/SPAN&gt;&lt;EM&gt;Format&lt;/EM&gt;&lt;SPAN&gt;,&amp;nbsp;&lt;/SPAN&gt;&lt;EM&gt;Password&lt;/EM&gt;&lt;SPAN&gt;,&amp;nbsp;&lt;/SPAN&gt;&lt;EM&gt;WriteResPassword&lt;/EM&gt;&lt;SPAN&gt;,&amp;nbsp;&lt;/SPAN&gt;&lt;EM&gt;IgnoreReadOnlyRecommended&lt;/EM&gt;&lt;SPAN&gt;,&amp;nbsp;&lt;/SPAN&gt;&lt;EM&gt;Origin&lt;/EM&gt;&lt;SPAN&gt;,&amp;nbsp;&lt;/SPAN&gt;&lt;EM&gt;Delimiter&lt;/EM&gt;&lt;SPAN&gt;,&amp;nbsp;&lt;/SPAN&gt;&lt;EM&gt;Editable&lt;/EM&gt;&lt;SPAN&gt;,&amp;nbsp;&lt;/SPAN&gt;&lt;EM&gt;Notify&lt;/EM&gt;&lt;SPAN&gt;,&amp;nbsp;&lt;/SPAN&gt;&lt;EM&gt;Converter&lt;/EM&gt;&lt;SPAN&gt;,&amp;nbsp;&lt;/SPAN&gt;&lt;EM&gt;AddToMru&lt;/EM&gt;&lt;SPAN&gt;,&amp;nbsp;&lt;/SPAN&gt;&lt;EM&gt;Local&lt;/EM&gt;&lt;SPAN&gt;,&amp;nbsp;&lt;/SPAN&gt;&lt;EM&gt;CorruptLoad&lt;/EM&gt;&lt;SPAN&gt;)&lt;/SPAN&gt;&lt;/CODE&gt;&lt;BR /&gt;Where UpdateLink comes after the filename, if I wanted to add some other parameter like readOnly = false, I believe it would be just following the logic&lt;BR /&gt;{filename, True, False}&lt;BR /&gt;&lt;BR /&gt;This works for me, if this works for you too, please mark it as helpful: D&lt;BR /&gt;------------------------------&lt;BR /&gt;Emerson Ferreira&lt;BR /&gt;Sr Business Analyst&lt;BR /&gt;Avanade Brasil&lt;BR /&gt;+55 (081) 98886-9544&lt;BR /&gt;------------------------------&lt;BR /&gt;</description>
      <pubDate>Fri, 14 May 2021 13:34:00 GMT</pubDate>
      <guid>https://community.blueprism.com/t5/Digital-Exchange/Excel-VBO-Open-Workbook-with-custom-parameters/m-p/64277#M2678</guid>
      <dc:creator>EmersonF</dc:creator>
      <dc:date>2021-05-14T13:34:00Z</dc:date>
    </item>
    <item>
      <title>RE: Excel VBO - Open Workbook with custom parameters</title>
      <link>https://community.blueprism.com/t5/Digital-Exchange/Excel-VBO-Open-Workbook-with-custom-parameters/m-p/64278#M2679</link>
      <description>&lt;a href="https://community.blueprism.com/t5/user/viewprofilepage/user-id/937"&gt;@AP.Philippa&lt;/a&gt;, Let me know if this works for you!​&lt;BR /&gt;&lt;BR /&gt;------------------------------&lt;BR /&gt;Emerson Ferreira&lt;BR /&gt;Sr Business Analyst&lt;BR /&gt;Avanade Brasil&lt;BR /&gt;+55 (081) 98886-9544&lt;BR /&gt;------------------------------&lt;BR /&gt;</description>
      <pubDate>Fri, 14 May 2021 14:04:00 GMT</pubDate>
      <guid>https://community.blueprism.com/t5/Digital-Exchange/Excel-VBO-Open-Workbook-with-custom-parameters/m-p/64278#M2679</guid>
      <dc:creator>EmersonF</dc:creator>
      <dc:date>2021-05-14T14:04:00Z</dc:date>
    </item>
    <item>
      <title>RE: Excel VBO - Open Workbook with custom parameters</title>
      <link>https://community.blueprism.com/t5/Digital-Exchange/Excel-VBO-Open-Workbook-with-custom-parameters/m-p/64279#M2680</link>
      <description>&lt;P&gt;Hi Emerson,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Thank you very much for your suggestion. Just tried it and it also works for me!&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I do have another question. Which parameters do I need to include in the code stage when I for example want to make use of the parameter "&lt;STRONG&gt;Local&lt;/STRONG&gt;"? Do I only have to reference the two params &lt;EM&gt;{filename, True}&lt;/EM&gt; or do I have to reference all the parameters that are between the two (also include: &lt;EM&gt;UpdateLinks, ReadOnly, Format, etc.&lt;/EM&gt;)?). When having to reference all parameters, do you know of workaround as this seems far from efficient.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Thanks in advance!&lt;/P&gt;&lt;BR /&gt;&lt;BR /&gt;------------------------------&lt;BR /&gt;Arthur Philippa&lt;BR /&gt;RPA Developer&lt;BR /&gt;Port of Rotterdam&lt;BR /&gt;Europe/Amsterdam&lt;BR /&gt;------------------------------&lt;BR /&gt;</description>
      <pubDate>Fri, 14 May 2021 14:05:00 GMT</pubDate>
      <guid>https://community.blueprism.com/t5/Digital-Exchange/Excel-VBO-Open-Workbook-with-custom-parameters/m-p/64279#M2680</guid>
      <dc:creator>AP.Philippa</dc:creator>
      <dc:date>2021-05-14T14:05:00Z</dc:date>
    </item>
    <item>
      <title>RE: Excel VBO - Open Workbook with custom parameters</title>
      <link>https://community.blueprism.com/t5/Digital-Exchange/Excel-VBO-Open-Workbook-with-custom-parameters/m-p/64280#M2681</link>
      <description>&lt;SPAN&gt;I believe that you will have to set the other parameters to false, I don't have an alternative solution at the moment &lt;span class="lia-unicode-emoji" title=":confused_face:"&gt;😕&lt;/span&gt;&lt;BR /&gt;I'm sorry&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;------------------------------&lt;BR /&gt;Emerson Ferreira&lt;BR /&gt;Sr Business Analyst&lt;BR /&gt;Avanade Brasil&lt;BR /&gt;+55 (081) 98886-9544&lt;BR /&gt;------------------------------&lt;BR /&gt;</description>
      <pubDate>Fri, 14 May 2021 14:24:00 GMT</pubDate>
      <guid>https://community.blueprism.com/t5/Digital-Exchange/Excel-VBO-Open-Workbook-with-custom-parameters/m-p/64280#M2681</guid>
      <dc:creator>EmersonF</dc:creator>
      <dc:date>2021-05-14T14:24:00Z</dc:date>
    </item>
  </channel>
</rss>

