LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Non-embedded graph in Excel report gen

I am using the Labview report generator to generate excel files of large batches of data. Is there a way to link the graph to data in the excel file rather than have it embedded in the graph itself? I need to be able to, for example, update a cell later on in the excel file and have the graph automatically update. Is there a way to create the graph by passing in an array of cell IDs rather than an array of numerics?

 

Thanks!

Alex

0 Kudos
Message 1 of 4
(2,085 Views)

Hi Alex,

 

Can you clarify for me what you're trying to do?

 

The graph you are referring to is in the excel file, or on the Front Panel of your VI?

 

If it is in the excel file: You want to basically have the Chart Data Range of the graph be a reference to particular column/row data range in the sheet, which you could potentially then go and edit manually (using Excel) later on?

Ryan C.
Applications Engineer
National Instruments
0 Kudos
Message 2 of 4
(2,065 Views)

Ryan,

 

Yes, the graph is in the excel file. When I use the standard insert graph vi, I get a graph in excel where all the data are embedded into the graph and it is a "microsoft chart object". Instead, I am trying to get just the regular old graph in excel as if I selected some data in the worksheet and went to insert graph in the excel menu. 

 

Does that make sense or am I not explaining it well?

Thanks!

Alex

0 Kudos
Message 3 of 4
(2,037 Views)

Hi Alex,

 

Yes, your explanation does verify what I thought you are trying to do.

 

Unfortunately, we do not have some complex VI in LabVIEW that creates all of the features of a regular old excel graph (there would be a lot of things to input, just imagine).

 

I have a couple suggestions.  The first suggestion is to try to either make a macro or find a macro for excel that programmatically sets up all of that graph stuff.  If you have this macro, you can use LabVIEW to run it, pretty straightforward: http://zone.ni.com/reference/en-XX/help/372120A-01/lvoffice/excel_run_macro/  and of course, if you were creating the data in LabVIEW, you can use Write to Spreadsheet to insert the data into the excel file first.

 

The second suggestion is to use ActiveX controls.  ActiveX is something that supports windows software, so you could go through and program each action in excel programmatically using ActiveX controls.  There are example in the NI Example Finder; here is one example using ActiveX for Excel: https://decibel.ni.com/content/docs/DOC-5780

 

Best of luck,

Ryan C.
Applications Engineer
National Instruments
0 Kudos
Message 4 of 4
(2,023 Views)