Discussion:
How to obtain image from excel using activex
(too old to reply)
AndrewAG
2008-04-16 10:10:07 UTC
Permalink
The program I'm building first sends a jpeg to excel using the first attached vi.  What I need to be able to do is retrieve the image from said file using Activex.  It's fairly simple to retrieve individual strings and values from cells, but I'm not sure how to redisplay an image in LabVIEW once it's in excel.
 
Anyone know how to resolve this?
 
The first file I've attached shows how the image gets into excel - the usual way I gleamed from reading these boards.
The second shows my vi retrieving a number from one of the cells in excel - not an image
 
Thank you all for your help!


set cell value with picture.vi:
http://forums.ni.com/attachments/ni/170/316559/1/set cell value with picture.vi


retrieve value.vi:
http://forums.ni.com/attachments/ni/170/316559/2/retrieve value.vi
MikeS81
2008-04-16 13:40:04 UTC
Permalink
Hi AndrewAG,
you can use the CopyPicture function. See the attached example. The cases with the yellow background should be interesting for you. First i use your function to add a picture ("the brain.jpg" from tst) into the first worksheet. Then i read it with the CopyFunction, so that it is available in the clipbord and then i read it from the clipboard to save it as (bmp, jpg or png), the example works with bmp. You have to clear the errors in the clipboard vi, but they are there because of i save it for LV80.
Hope this helps.
Mike


GetPictureFromExcel_LV80.zip:
http://forums.ni.com/attachments/ni/170/316609/1/GetPictureFromExcel_LV80.zip
AndrewAG
2008-04-17 19:40:09 UTC
Permalink
This is fantastic!  Thank you so very much.
 
-AndrewAG

Continue reading on narkive:
Loading...