Jump to content

jpg or bmp from LabVIEW toExcel


Recommended Posts

We have a case where we take a snapshot of a XY graph, save the image to a BMP file, and then insert the BMP to Excel. See attached code for inserting a BMP file to Excel. (am using LabVIEW 7.1.1f2 and Excel 2003)

This seems like overkill. What you are trying to do while not impossible is not how the Excel Active X interface was meant to be used. Rather than trying to find out how this would have to be worked out and then maybe the more complicated thing to try to explain it I would rather suggest to send the data to Excel instead and then start a macro in the Excel Spreadsheet that takes those data and creates an Excel Graph from it. While this may sound work intense I'm sure trying to get a LabVIEW graph properly into Excel as bitmap will be at least as hard and that would assume you know how to build a device independant bitmap in memory and transfer its handle across process bounderies.

Rolf Kalbermatter

Link to comment
This seems like overkill. What you are trying to do while not impossible is not how the Excel Active X interface was meant to be used. Rather than trying to find out how this would have to be worked out and then maybe the more complicated thing to try to explain it I would rather suggest to send the data to Excel instead and then start a macro in the Excel Spreadsheet that takes those data and creates an Excel Graph from it. While this may sound work intense I'm sure trying to get a LabVIEW graph properly into Excel as bitmap will be at least as hard and that would assume you know how to build a device independant bitmap in memory and transfer its handle across process bounderies.

Rolf Kalbermatter

I agree that a native Excel graph is better as the end user can do their own manipulations of the data and so forth. In our case, we provided another worksheet with the rawdata for their own manipulation. Also, to get Excel to format that was a bit time consuming (it seemed at least) and with the variations of the versions, we viewed that as an additional risk.

Link to comment
  • 4 years later...

This seems like overkill. What you are trying to do while not impossible is not how the Excel Active X interface was meant to be used. Rather than trying to find out how this would have to be worked out and then maybe the more complicated thing to try to explain it I would rather suggest to send the data to Excel instead and then start a macro in the Excel Spreadsheet that takes those data and creates an Excel Graph from it. While this may sound work intense I'm sure trying to get a LabVIEW graph properly into Excel as bitmap will be at least as hard and that would assume you know how to build a device independant bitmap in memory and transfer its handle across process bounderies.

Rolf Kalbermatter

Where can I get the VI for copying Bmp or Jpeg from Labview to Excel?

Help me out Please.

Thanks,

Suresh

Link to comment

Try this. It copies a control's picture into the clipboard. Then you can paste from the clipboard into Excel.

Let me know if you are missing some VIs. I think some of the subVIs use OpenG VIs, so I hope you have that installed.

Thanks a lot. I will check and get back to you on the same.

Suresh

Link to comment

Try this. It copies a control's picture into the clipboard. Then you can paste from the clipboard into Excel.

Let me know if you are missing some VIs. I think some of the subVIs use OpenG VIs, so I hope you have that installed.

Is it possible to send the graph from LabVIEW 8.6 to Excel directly?

Thanjks,

Suresh

Link to comment

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.