From Friday, April 19th (11:00 PM CDT) through Saturday, April 20th (2:00 PM CDT), 2024, ni.com will undergo system upgrades that may result in temporary service interruption.

We appreciate your patience as we improve our online experience.

LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Excel Graph Legend Formatting - Report Generation Tool

Solved!
Go to solution

Hi all,

 

I'm currently using the Report Generation Tool for Labview '11 and cannot seem to figure out how to edit the font properties for a graph's legend. Attached is a screenshot of an example output.

 

 

The Excel Graph Font.vi's Help file says that it should be able to modify the legend, yet I can't seem to figure out how to configure it to do so. If anyone can walk me through the steps or tell me what I am missing, I'd greatly appreciate it.

0 Kudos
Message 1 of 9
(3,704 Views)

It's hard to say without seeing the code but to format the font use the Excel Set Graph Font vi after adding the graph. This vi apply to the last graph you've inserted. Refer to the LV help for this vi for more details.

 

Ben64

0 Kudos
Message 2 of 9
(3,701 Views)

I used that VI for formatting the X and Y axes, but can't get it to format the legend... I've referred to the help that says it can format the legend, but doesn't really give instruction on how to.

 

 

I've attached a snippet of the VI after the Append Table to Report.vi.

0 Kudos
Message 3 of 9
(3,683 Views)

OK I found a (not trivial) way to modify the graph legend. See the attached vi.

 

Ben64

Message 4 of 9
(3,660 Views)

Nice, Ben64. This is a great example for the Code Exchange!

 

http://www.ni.com/code/

Ravi A.
National Instruments | Applications Engineer
0 Kudos
Message 5 of 9
(3,656 Views)
Solution
Accepted by topic author ChaoyD

Added minor corrections (deleted end of line characters from row and column headers).

 

Ben64

Message 6 of 9
(3,652 Views)

Thank you for the vi, ben64; it worked great! I modified it to accept a report in, as I'd like it to be more modular, but the ActiveX stuff was spot on and does exactly what needed to be done.

0 Kudos
Message 7 of 9
(3,646 Views)

Hello again,

 

It seems my team has decided to change direction and use Word instead of Excel. As such, I've been attempting to convert the VI ben64 provided, but I'm stuck on the ActiveX references... I've attached what I've done so far, but could someone help me (or instruct me) on making this VI work with Word?

 

 

Thanks.

Message 8 of 9
(3,619 Views)

@ChaoyD wrote:

Hello again,

 

It seems my team has decided to change direction and use Word instead of Excel. As such, I've been attempting to convert the VI ben64 provided, but I'm stuck on the ActiveX references... I've attached what I've done so far, but could someone help me (or instruct me) on making this VI work with Word?

 

 

Thanks.



The Word object model is probably the most complicated of the Office suite and you are loosing the calculation ability of Excel.

 Attached is a vi to format the chart legend in a Word document.

 

Ben64

Message 9 of 9
(3,612 Views)