LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Image to Excel

Hi, 

I have done programming of Exporting image directly to Excel by referring NI Forums. But I need some more sophistications in my code. When I upload one image to the excel sheet, it is uploaded. But my requirement is, size of cell in excel sheet exactly where I upload my image as per the program, for instance say A1 cell should be same in size of the image I uploaded. But in my code, Image occupies more more number of cells than I defined (A1) in the program. 

In simple words, Images occupies number of cells than the defined cell. Why this happens? How can I make image and cell size be same?

Here is an attachment of my program. 

Best Regards,
Dhans 😉
Kudos are welcome 😉
Aspirant Labview Programmer (Labview 14) 😉
0 Kudos
Message 1 of 4
(3,005 Views)

About three years ago, someone posted a revised "Generate Excel Report" example on the Forums (you should be able to find it by doing a search for "Revised example" and looking at what pops up).  Part of this was placing a graph on an Excel WorkSheet.  As I recall, the code placed the graph at a particular spot, specified by a Row/Column coordinate, but the size of the graph was whatever the size of the graph happened to be -- the Cell address merely specified its upper left corner.  I suspect the same will be true with placing a picture -- the Cell address specifies the position of the image, but not its size.  Notice this is exactly the behavior of Excel, itself -- if you Insert a Picture, you specify its upper-left corner by selecting a Cell, but the picture size will be whatever it was.

 

Bob Schor 

Message 2 of 4
(2,962 Views)

Can you show us what you actually try to achieve?

 

Ben64

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

dhans a écrit :

In simple words, Images occupies number of cells than the defined cell. Why this happens? How can I make image and cell size be same?

Here is an attachment of my program. 


Pictures are not inserted into cells, they are on a separate layer and float over the cells. As was already said, you precise the cell that will be used to locate the top left corner of the picture you insert. You can always size this cell to the dimension of the picture (and all the cells in the same row and column will have height or width modified) but this will probably results in an awkward looking spreadsheet.

 

 Another possibility is to merge the cells of the area covered by the picture but this may get quite complicated.

 

What some people do is insert the picture in a comment, in this case the picture only shows when a user hover over this specific cell.

 

Ben64

0 Kudos
Message 4 of 4
(2,929 Views)