<?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: Get and set row height and font size of Excel worksheet cells in Inventor Programming - iLogic, Macros, AddIns &amp; Apprentice</title>
    <link>https://forums.autodesk.com/t5/inventor-programming-ilogic/get-and-set-row-height-and-font-size-of-excel-worksheet-cells/m-p/11818744#M150105</link>
    <description>&lt;P&gt;I don't work with iLogic, but this sounds very similar to the errors that VBA code generates when using a object that hasn't been properly assigned. I'm guessing that either "Logger" or "ExcelSH" does not actually refer to an object. In VBA this would look like:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="general"&gt;Dim ExcelSH as Worksheet
Set ExcelSH = New Worksheet' Are you missing this line?&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;-Kerry&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Mon, 13 Mar 2023 20:22:42 GMT</pubDate>
    <dc:creator>etckerry</dc:creator>
    <dc:date>2023-03-13T20:22:42Z</dc:date>
    <item>
      <title>Get and set row height and font size of Excel worksheet cells</title>
      <link>https://forums.autodesk.com/t5/inventor-programming-ilogic/get-and-set-row-height-and-font-size-of-excel-worksheet-cells/m-p/11818008#M150094</link>
      <description>&lt;P&gt;Hi everybody!&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Lately I've been trying to create external Excel sheets with iLogic, with the Excel API/object. Filling in cells is not an issue, but I'm not able to change the font and/or font size of cells/ranges in the Excel sheet.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;First I tried to retrieve the current Font size with this function:&lt;/P&gt;&lt;LI-CODE lang="general"&gt;Logger.Info("Fontsize " &amp;amp; ExcelSH.Range("A1:A1").Font.Size)&lt;/LI-CODE&gt;&lt;P&gt;But this doesn't work,&amp;nbsp; iLogic returns the error: "Object reference not set to an instance of an object.".&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Also tried to retrieve the rowheight by this snippet:&lt;/P&gt;&lt;LI-CODE lang="general"&gt;Logger.Info("Row height " &amp;amp; ExcelSH.Rows.Item(1).RowHeight)&lt;/LI-CODE&gt;&lt;P&gt;But this also returns the above mentioned error.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I'm doubting if it's in anyway possible to change the formatting of cells in Excel through iLogic. Maybe some of you could help me with this?&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;Thanks!&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 13 Mar 2023 15:10:12 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/inventor-programming-ilogic/get-and-set-row-height-and-font-size-of-excel-worksheet-cells/m-p/11818008#M150094</guid>
      <dc:creator>miechh</dc:creator>
      <dc:date>2023-03-13T15:10:12Z</dc:date>
    </item>
    <item>
      <title>Re: Get and set row height and font size of Excel worksheet cells</title>
      <link>https://forums.autodesk.com/t5/inventor-programming-ilogic/get-and-set-row-height-and-font-size-of-excel-worksheet-cells/m-p/11818744#M150105</link>
      <description>&lt;P&gt;I don't work with iLogic, but this sounds very similar to the errors that VBA code generates when using a object that hasn't been properly assigned. I'm guessing that either "Logger" or "ExcelSH" does not actually refer to an object. In VBA this would look like:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="general"&gt;Dim ExcelSH as Worksheet
Set ExcelSH = New Worksheet' Are you missing this line?&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;-Kerry&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 13 Mar 2023 20:22:42 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/inventor-programming-ilogic/get-and-set-row-height-and-font-size-of-excel-worksheet-cells/m-p/11818744#M150105</guid>
      <dc:creator>etckerry</dc:creator>
      <dc:date>2023-03-13T20:22:42Z</dc:date>
    </item>
    <item>
      <title>Re: Get and set row height and font size of Excel worksheet cells</title>
      <link>https://forums.autodesk.com/t5/inventor-programming-ilogic/get-and-set-row-height-and-font-size-of-excel-worksheet-cells/m-p/11819482#M150112</link>
      <description>&lt;P&gt;Could you supply the full code accessing the worksheet?&amp;nbsp;&lt;/P&gt;&lt;P&gt;The error&amp;nbsp;&amp;nbsp;"Object reference not set to an instance of an object.". Suggests that your not able to access an object so the next question is which object? You will need to check the work sheet then the range and so on.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 14 Mar 2023 05:39:42 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/inventor-programming-ilogic/get-and-set-row-height-and-font-size-of-excel-worksheet-cells/m-p/11819482#M150112</guid>
      <dc:creator>A.Acheson</dc:creator>
      <dc:date>2023-03-14T05:39:42Z</dc:date>
    </item>
    <item>
      <title>Re: Get and set row height and font size of Excel worksheet cells</title>
      <link>https://forums.autodesk.com/t5/inventor-programming-ilogic/get-and-set-row-height-and-font-size-of-excel-worksheet-cells/m-p/11819651#M150116</link>
      <description>&lt;P&gt;Oh oh oh, I feel so dumb!! &lt;img class="lia-deferred-image lia-image-emoji" src="https://forums.autodesk.com/html/@EC60D1F153AC8473092B61FA85050883/emoticons/1f635.png" alt=":dizzy_face:" title=":dizzy_face:" /&gt; There's no solution for that... The problem was the order of lines of code. I called the ExcelSH.Rows.Item(1).RowHeight property before the ExcelSH object was even created. So I reversed the order of commands and now it works.&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;Sorry I vaporized the precious time of you all...&lt;/P&gt;</description>
      <pubDate>Tue, 14 Mar 2023 08:02:35 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/inventor-programming-ilogic/get-and-set-row-height-and-font-size-of-excel-worksheet-cells/m-p/11819651#M150116</guid>
      <dc:creator>miechh</dc:creator>
      <dc:date>2023-03-14T08:02:35Z</dc:date>
    </item>
  </channel>
</rss>

