<?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 : Programmatically Save Excel Chart as PNG Files in LabVIEW</title>
    <link>https://ni.lithium.com/t5/LabVIEW/Programmatically-Save-Excel-Chart-as-PNG-Files/m-p/3208838#M931069</link>
    <description>&lt;P&gt;Having seen Ben's solution (pretty complicated!), let me echo Gregory's question and ask "Why Excel"? &amp;nbsp;From the initial description of your problem, it&amp;nbsp;&lt;U&gt;sounds&lt;/U&gt; like you have LabVIEW data and want to make a .PNG file that contains a graph of the data, using Excel as a "conduit" to convert LabVIEW data points into such an Image file. &amp;nbsp;If this is the only reason to involve Excel (i.e. if you are not saving the data points themselves in Excel for some purpose), then it would seem a&amp;nbsp;&lt;U&gt;lot&lt;/U&gt; simpler to explore a "pure LabVIEW" approach to this problem.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;You were also asked to post the VI (or VIs) that you are developing to solve this problem, and so far have not done so. &amp;nbsp;Posting your VIs gives us a much better idea of what you are&amp;nbsp;&lt;U&gt;really&lt;/U&gt; trying to do (and haven't clearly explained to us), and allows us to be more helpful to you. &amp;nbsp;It's not too late to do so ...&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Bob Schor&lt;/P&gt;</description>
    <pubDate>Tue, 27 Oct 2015 02:46:01 GMT</pubDate>
    <dc:creator>Bob_Schor</dc:creator>
    <dc:date>2015-10-27T02:46:01Z</dc:date>
    <item>
      <title>Programmatically Save Excel Chart as PNG Files</title>
      <link>https://ni.lithium.com/t5/LabVIEW/Programmatically-Save-Excel-Chart-as-PNG-Files/m-p/3207645#M930635</link>
      <description>&lt;P&gt;Hi all:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I'm very new to ActiveX and its Automation functions so I need some guidance.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;STRONG&gt;I'm trying save an Excel chart as a PNG image.&lt;/STRONG&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;The &lt;U&gt;chart was not created by LabVIEW&lt;/U&gt;; LabVIEW just copies data into a template with the chart configured to dynamically detect ranges and plot the corresponding data. (I'm not sure how Excel recognizes the chart - MSObject or MSChart?)&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Here's what I've done so far but it isn't working (attached)&amp;nbsp;- Error pops up immediately after the ActiveX Variant to Data VI. (Index of graph is 0 - no other objects in the file)&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Any help or advice&amp;nbsp;will be&amp;nbsp;appreciated.&lt;/P&gt;</description>
      <pubDate>Fri, 23 Oct 2015 03:53:29 GMT</pubDate>
      <guid>https://ni.lithium.com/t5/LabVIEW/Programmatically-Save-Excel-Chart-as-PNG-Files/m-p/3207645#M930635</guid>
      <dc:creator>User002</dc:creator>
      <dc:date>2015-10-23T03:53:29Z</dc:date>
    </item>
    <item>
      <title>Re: Programmatically Save Excel Chart as PNG Files</title>
      <link>https://ni.lithium.com/t5/LabVIEW/Programmatically-Save-Excel-Chart-as-PNG-Files/m-p/3207704#M930652</link>
      <description>&lt;P&gt;You should post your code as a VI snippet or attach your VI so that others could try to run/modify your code.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;(Normally I like screenshots because I can see them without having to open LabVIEW but in this case, it would be useful to be able to modify the code...I'm not going to re-create it from scratch!!)&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;My suspicion is that the 'Item' you get out of the 'Sheets' node is a 'Sheet' rather than a 'Chart' so trying to convert back from the variant is failing. Either that or the items are 1-indexed instead of 0-indexed?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 23 Oct 2015 09:04:53 GMT</pubDate>
      <guid>https://ni.lithium.com/t5/LabVIEW/Programmatically-Save-Excel-Chart-as-PNG-Files/m-p/3207704#M930652</guid>
      <dc:creator>Sam_Sharp</dc:creator>
      <dc:date>2015-10-23T09:04:53Z</dc:date>
    </item>
    <item>
      <title>Re: Programmatically Save Excel Chart as PNG Files</title>
      <link>https://ni.lithium.com/t5/LabVIEW/Programmatically-Save-Excel-Chart-as-PNG-Files/m-p/3208554#M930966</link>
      <description>&lt;P&gt;Is it an especially hard chart to generate? It might be easier to generate the graph in LabVIEW (even if it's a hidden indicator) and then save that as a .png, but I don't know your specific requirement.&lt;/P&gt;</description>
      <pubDate>Mon, 26 Oct 2015 15:58:29 GMT</pubDate>
      <guid>https://ni.lithium.com/t5/LabVIEW/Programmatically-Save-Excel-Chart-as-PNG-Files/m-p/3208554#M930966</guid>
      <dc:creator>Gregory</dc:creator>
      <dc:date>2015-10-26T15:58:29Z</dc:date>
    </item>
    <item>
      <title>Re : Programmatically Save Excel Chart as PNG Files</title>
      <link>https://ni.lithium.com/t5/LabVIEW/Programmatically-Save-Excel-Chart-as-PNG-Files/m-p/3208803#M931053</link>
      <description>&lt;BLOCKQUOTE&gt;&lt;HR /&gt;VyRianS a écrit&amp;nbsp;:&lt;BR /&gt;
&lt;P&gt;Hi all:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I'm very new to ActiveX and its Automation functions so I need some guidance.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;STRONG&gt;I'm trying save an Excel chart as a PNG image.&lt;/STRONG&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;The &lt;U&gt;chart was not created by LabVIEW&lt;/U&gt;; LabVIEW just copies data into a template with the chart configured to dynamically detect ranges and plot the corresponding data. (I'm not sure how Excel recognizes the chart - MSObject or MSChart?)&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Here's what I've done so far but it isn't working (attached)&amp;nbsp;- Error pops up immediately after the ActiveX Variant to Data VI. (Index of graph is 0 - no other objects in the file)&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Any help or advice&amp;nbsp;will be&amp;nbsp;appreciated.&lt;/P&gt;
&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;Where is the chart located, in the worksheet that contain the data or in a separate chartsheet? These are two different objects.&lt;/P&gt;
&lt;P&gt;I would guess it is included in the worksheet where the data is written. In this case it is a ChartObject object. You access it throught the ChartObjects collection of the worksheet. In Excel the first object of a collection is at index 1 (not 0, that will throw an error).&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Ben64&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;IMG src="https://ip1.i.lithium.com/f9d66e637a494e204b3dfc3403cd9eb6dd301a4f/68747470733a2f2f6e692e6c69746869756d2e636f6d2f74352f696d6167652f736572766572706167652f696d6167652d69642f31373339393969353637463736373531343646454532462f696d6167652d73697a652f6f726967696e616c3f763d6d70626c2d312670783d2d31" border="0" alt="export graph.png" title="export graph.png" /&gt;&lt;/P&gt;</description>
      <pubDate>Mon, 26 Oct 2015 23:40:06 GMT</pubDate>
      <guid>https://ni.lithium.com/t5/LabVIEW/Programmatically-Save-Excel-Chart-as-PNG-Files/m-p/3208803#M931053</guid>
      <dc:creator>ben64</dc:creator>
      <dc:date>2015-10-26T23:40:06Z</dc:date>
    </item>
    <item>
      <title>Re : Programmatically Save Excel Chart as PNG Files</title>
      <link>https://ni.lithium.com/t5/LabVIEW/Programmatically-Save-Excel-Chart-as-PNG-Files/m-p/3208838#M931069</link>
      <description>&lt;P&gt;Having seen Ben's solution (pretty complicated!), let me echo Gregory's question and ask "Why Excel"? &amp;nbsp;From the initial description of your problem, it&amp;nbsp;&lt;U&gt;sounds&lt;/U&gt; like you have LabVIEW data and want to make a .PNG file that contains a graph of the data, using Excel as a "conduit" to convert LabVIEW data points into such an Image file. &amp;nbsp;If this is the only reason to involve Excel (i.e. if you are not saving the data points themselves in Excel for some purpose), then it would seem a&amp;nbsp;&lt;U&gt;lot&lt;/U&gt; simpler to explore a "pure LabVIEW" approach to this problem.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;You were also asked to post the VI (or VIs) that you are developing to solve this problem, and so far have not done so. &amp;nbsp;Posting your VIs gives us a much better idea of what you are&amp;nbsp;&lt;U&gt;really&lt;/U&gt; trying to do (and haven't clearly explained to us), and allows us to be more helpful to you. &amp;nbsp;It's not too late to do so ...&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Bob Schor&lt;/P&gt;</description>
      <pubDate>Tue, 27 Oct 2015 02:46:01 GMT</pubDate>
      <guid>https://ni.lithium.com/t5/LabVIEW/Programmatically-Save-Excel-Chart-as-PNG-Files/m-p/3208838#M931069</guid>
      <dc:creator>Bob_Schor</dc:creator>
      <dc:date>2015-10-27T02:46:01Z</dc:date>
    </item>
  </channel>
</rss>

