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: 

Save Front Panel Picture to Excel

Solved!
Go to solution

Hello, for my program I generate a spreadsheet with a large matrix in it (500x100) or so. Since Excel cannot produce that nice looking of a graph, I would like to export my Intensity Graph into Excel.

 

I have been searching the forums for a bit now and could not find the information on how to do this... I don't think the placement inside the spreadsheet is crucial, so just some advice to get the picture in there would be great.

 

Thanks,

gj

0 Kudos
Message 1 of 13
(4,474 Views)

Have you looked at the following link:

http://decibel.ni.com/content/docs/DOC-9901

Adnan Zafar
Certified LabVIEW Architect
Coleman Technologies
Message 2 of 13
(4,470 Views)

That looks like it will be useful, but I do not know what to use as the file path of the picture, because it is going to come from one of my indicators.

0 Kudos
Message 3 of 13
(4,462 Views)

Hi there,

 

In order to directly interface with excel you will need the "NI LabVIEW Report Generation Toolkit for Microsoft Office". This toolkit is based on ActiveX coding.

 

You will be able to export a graph to Excel using ActiveX VIs yourself, but this may get complex and require a good background in coding. If you have the toolkit, the process will be far simpler.

 

I'm afraid ActiveX is not my specialty, so I will look into this for you and hope to get back to you over the next few days.

Rhys
Applications Engineer
National Instruments
0 Kudos
Message 4 of 13
(4,457 Views)

You can replace that with the Append Control Image to Report VI that you will find in the Report Generation palette.

Adnan Zafar
Certified LabVIEW Architect
Coleman Technologies
Message 5 of 13
(4,448 Views)

Is there a way to do this without purchasing the Report Generation Toolkit?

0 Kudos
Message 6 of 13
(4,445 Views)

As Rhys mentioned, you should be able to do it using the ActiveX interface but I have never really done it that way, so sorry cannot be of much help there.

Adnan Zafar
Certified LabVIEW Architect
Coleman Technologies
0 Kudos
Message 7 of 13
(4,443 Views)

One thing I did see was some function called GetBitmap or something and then you can SaveBitmaptoJPEG. I do not know if these are a part of the report generation toolkit or not, but if I just saved to a temp folder, could that work? Have you heard of these functions?

0 Kudos
Message 8 of 13
(4,439 Views)
Solution
Accepted by topic author gjacob

 


@gjacob wrote:

One thing I did see was some function called GetBitmap or something and then you can SaveBitmaptoJPEG. I do not know if these are a part of the report generation toolkit or not, but if I just saved to a temp folder, could that work? Have you heard of these functions?


 

The intensity graph (as well as all the other graphs) have a "Get Image" method that you can use. You right-click on the graph and select Create -> Invoke Node -> Get Image. You can then wire the image data directly to one of the image write functions:

 

Message 9 of 13
(4,420 Views)

Thanks smercurio, I'm going to go with that. I think it might actually be desirable to have the .png file and the spreadsheet file separated, so it will be good to have it this way.

0 Kudos
Message 10 of 13
(4,407 Views)