<?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 Thanks a lot Bastiaan! That in Product Forum</title>
    <link>https://community.blueprism.com/t5/Product-Forum/MS-Excel-Actions-for-aligning-bolding-and-underlining/m-p/55730#M10030</link>
    <description>Thanks a lot Bastiaan! That helped and now the code works.</description>
    <pubDate>Wed, 24 May 2017 17:01:00 GMT</pubDate>
    <dc:creator>JariKorkkinen</dc:creator>
    <dc:date>2017-05-24T17:01:00Z</dc:date>
    <item>
      <title>MS Excel: Actions for aligning, bolding and underlining</title>
      <link>https://community.blueprism.com/t5/Product-Forum/MS-Excel-Actions-for-aligning-bolding-and-underlining/m-p/55729#M10029</link>
      <description>Hello,

I would need to do some cell formatting in Excel (aligning left+right+center, bolding, underlining) and apparently there is no way to do these with basic Excel VBO actions. Has somebody struggled with same thing and found a way to do these?

I have very little knowledge of VB.NET but I´ve tried to write separate code stages for each of these actions but cannot get those working.

Here´s a code example:
------------------------
Dim wb, excel, range As Object

Try

wb = GetWorkbook(Handle, Nothing).ActiveSheet
excel = wb.Application
range = excel.Selection

range.HorizontalAlignment = xlRight

Finally

End Try
-------------------------------
When I press Check Code I get error "Compiler error -  xlRight is not defined". I assume it´s because required assembly and namespace are missing. I added Assembly: Microsoft.Office.Interop.Excel.dll  and Namespace: Microsoft.Office.Interop.Excel. After that Check Code does not give error anymore.

However when I try to run the process, it stops to the first step and gives an error: 

23.5.2017 9:41:07 ACTION: 'Create instance' Process: 'AR Dunning New' Subsheet: 'Import Excel sheets to collections' ERROR: Internal : Could not run the object because one of the code stages has a compile error, use Check for Errors for a list of problems

Any help would be highly appreciated!

BR, Jari</description>
      <pubDate>Tue, 23 May 2017 16:18:00 GMT</pubDate>
      <guid>https://community.blueprism.com/t5/Product-Forum/MS-Excel-Actions-for-aligning-bolding-and-underlining/m-p/55729#M10029</guid>
      <dc:creator>JariKorkkinen</dc:creator>
      <dc:date>2017-05-23T16:18:00Z</dc:date>
    </item>
    <item>
      <title>Thanks a lot Bastiaan! That</title>
      <link>https://community.blueprism.com/t5/Product-Forum/MS-Excel-Actions-for-aligning-bolding-and-underlining/m-p/55730#M10030</link>
      <description>Thanks a lot Bastiaan! That helped and now the code works.</description>
      <pubDate>Wed, 24 May 2017 17:01:00 GMT</pubDate>
      <guid>https://community.blueprism.com/t5/Product-Forum/MS-Excel-Actions-for-aligning-bolding-and-underlining/m-p/55730#M10030</guid>
      <dc:creator>JariKorkkinen</dc:creator>
      <dc:date>2017-05-24T17:01:00Z</dc:date>
    </item>
    <item>
      <title>Hi Jari,
  Can you please…</title>
      <link>https://community.blueprism.com/t5/Product-Forum/MS-Excel-Actions-for-aligning-bolding-and-underlining/m-p/55731#M10031</link>
      <description>Hi Jari,
&amp;nbsp; Can you please share what did you do that helped ? I am getting a similar error.</description>
      <pubDate>Tue, 29 May 2018 12:06:00 GMT</pubDate>
      <guid>https://community.blueprism.com/t5/Product-Forum/MS-Excel-Actions-for-aligning-bolding-and-underlining/m-p/55731#M10031</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2018-05-29T12:06:00Z</dc:date>
    </item>
    <item>
      <title>Hi Jari,
  Can you please…</title>
      <link>https://community.blueprism.com/t5/Product-Forum/MS-Excel-Actions-for-aligning-bolding-and-underlining/m-p/55732#M10032</link>
      <description>Hi Jari,
&amp;nbsp; Can you please share what did you do that helped ? I am getting a similar error.</description>
      <pubDate>Tue, 29 May 2018 12:10:00 GMT</pubDate>
      <guid>https://community.blueprism.com/t5/Product-Forum/MS-Excel-Actions-for-aligning-bolding-and-underlining/m-p/55732#M10032</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2018-05-29T12:10:00Z</dc:date>
    </item>
    <item>
      <title>Hi Jari,
You code for…</title>
      <link>https://community.blueprism.com/t5/Product-Forum/MS-Excel-Actions-for-aligning-bolding-and-underlining/m-p/55733#M10033</link>
      <description>Hi Jari,
You code for formatting is correct just need to put an numeric value for ""xlRight"".
&amp;nbsp;
Please refer below link to get all numeric values
&lt;A href="https://msdn.microsoft.com/en-us/library/microsoft.office.interop.excel…" target="test_blank"&gt;https://msdn.microsoft.com/en-us/library/microsoft.office.interop.excel…&lt;/A&gt;
&amp;nbsp;
Hope this resolves your issue.</description>
      <pubDate>Wed, 30 May 2018 12:38:00 GMT</pubDate>
      <guid>https://community.blueprism.com/t5/Product-Forum/MS-Excel-Actions-for-aligning-bolding-and-underlining/m-p/55733#M10033</guid>
      <dc:creator>Hitesh__Mhatre</dc:creator>
      <dc:date>2018-05-30T12:38:00Z</dc:date>
    </item>
  </channel>
</rss>

