08-02-2011 03:14 AM
Hi,
I'm creating an Excel report with graph and I would like to save an image of the graph to jpg, gif or bmp format.
I tried with VBA code, ActiveX but no result...
I have the report generation toolit, LV 2009 and Excel 2007.
Thanks.
08-02-2011 03:41 AM
Hi!
Does the Excel report create the graph or do you have the same graph in your VI in LabVIEW?
08-02-2011 03:46 AM
Hello,
Excel create the Graph.
Thanks.
08-02-2011 04:23 AM
Hi Carcasse,
After you have created the graph you can call the method Export under the Chart object in Excell structure.
08-02-2011 04:23 AM
08-02-2011 04:33 AM
Hello,
@g_Ricky: Thank you.
How I can create the chart object reference ?
Sorry but i'm a beginner's with Excel ActiveX...
@Even Deejay : Thanks for the link I will download the example and llb.
08-02-2011 04:40 AM
to create the reference to the excell chart obj, simply you click with the right button on the automation refnum connection of the function Automation Open then select from the menu create --> constant. A constant will be connected to the refnum input then click on the constant with the right buttons of the mouse and select Select ActiveX class --> browse, a window will open and there you have to choose the reference of Excell application you want to use, or as I did in my immage a reference of Microsoft graph object.
08-02-2011 09:25 AM - edited 08-02-2011 09:27 AM
Hello,
Thanks, but your solution reporting an error with no description,
but i found VBCode and he working with 97,2003 and 2007.
Only one problem : I can not run the code from the function available in LV maybe a problem with my diagram.
The working code : He can help anyone.
08-03-2011 02:37 AM
Hello Carcasse,
I think you can use this exemple export excel graph and then import the graph in LabVIEW using an activeX container (control palette .NET and activeX).
Unfortunately, the VI will not run with newer versions of the report generation toolkit. Luckily, the only portion of the code that is broken is the part that obtains the reference to the spreadsheet, which should be fairly trivial to re-write. The part that will help you however, is all of the property nodes in the Excel Export Graph.vi. The property nodes used here illustrate how to copy a graph from an excel spreadsheet to the clipboard.
Sincerely
Romain DUVAL || RF & Semiconductor Staff System Engineer || CLA || CTA
National Instruments France