LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

How to make Graph in Excel ?

Hi all

I have LV 7.1 and MS Office 2003.

I need make a graph in Excel but I need take data from Excel not from aplication MS Graph. It is diferent.

I need this, becouse after create report containing tables and graphs I need sometimes change values. I wont to change values like "snap and drag mouse in graph". Values in table must change too.

It is possible to make graph throught LV without using MS Graph ?

Thanks

Ivanek#
0 Kudos
Message 1 of 10
(4,646 Views)
do you use Report generation toolkit with Excel 2003 in Labview? If so, there are some VIs demostrated how to create graphs in Excel.

If the report generation toolkit is not used,then there are two ways. One is to use automation, it is not straightforward, the other way is to use a macro. I personally use the macro with excel because of the speed and flexibility.

-Joe
0 Kudos
Message 2 of 10
(4,638 Views)
Yes I use Report generation toolkit with Excel 2003 in Labview. Every examples for make a graph is using aplication MSgraph. So it's unuseless.

Macro is a good idea, but I need 60 graphs. I would like make 2 graphs on one page.

If You make macro for 60 graphs like in attachment or give me any idea how to make .. 🙂

Thanks

Ivanek#
0 Kudos
Message 3 of 10
(4,633 Views)
the attached image shows the macro to add one chart to the excel worksheet. The code can be called in a loop to create as many charts as needed. The chart title, source data and location will be changed for each chart.

The loop can be inside either labview or Excel, whichever is easier for you. If the loop is done in LV, then the macro will need to accept some variables/parameters.

-joe
0 Kudos
Message 4 of 10
(4,616 Views)
Hmm it's look good. I can try ....

Thanks wery much

Ivanek#
0 Kudos
Message 5 of 10
(4,611 Views)
Hi all,

I am using LabVIEW 7.1 without the report generation toolkit. Is it possible to generate graphs in Excel with ActiveX?

Joe showed a VI in the "Snap3.gif" which allows to transmit macros form labview to excel. I think this VI is part of the report generation toolkit. Is there a way to do the same without the report generation toolkit, maybe with ActiveX?


Does anyone have some examples or tutorials for generating Graphs in Excel with ActiveX or transmitting macros to Excel. Thanks a lot for your your help.

Best regards,
Michael
0 Kudos
Message 6 of 10
(4,554 Views)
Hi

I made graph to excel in Macro in LV without the report generation toolkit.

Look at "graph.zip"

[cz] Ivanek#
0 Kudos
Message 7 of 10
(4,539 Views)
Hi Ivanek,

thanks a lot. Do you have a simple running example as VI? I think I do something wrong.

Thanks a lot for your help.

Best regards,
Michael
0 Kudos
Message 8 of 10
(4,527 Views)
in order to import vba code into excel at runtime, you need to lower the macro security. In Excel, go to Tools >> Macro Security, choose the medium or lower security level, and check the box for "Trust Access to visual basic project". After making these changes, close Excel and give it another try.

-Joe
0 Kudos
Message 9 of 10
(4,517 Views)
Hi

Look at the modified VI. It is almost done :). Take a Macro from Joe "Snap3.gif" and replace them in this VI.

ActiveX is correct.

Good lock

[cz] Ivanek#
0 Kudos
Message 10 of 10
(4,494 Views)