LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Adding a picture to excel file using ActiveX

Solved!
Go to solution

This post in the thread in linked to has a link to the free toolkit and how it looks in labview.

Regards,
Even
_________________________________
Certified LabVIEW Associate Developer

Automated Test Developer
Topro AS
Norway
0 Kudos
Message 11 of 21
(2,365 Views)

Thanks.

0 Kudos
Message 12 of 21
(2,356 Views)

Paul,

 

I tried to use for loop for multiple entry as you said, but it gives me error. I tried to put everything in a for loop and still gives me error. And for some reason, it skips every other data entry. Do you know what is the problem? Also, when it gives error, then I am not able to open that specific excel file!! I should open another one (I guess that's because it doesn't close the application due to the error)

 

I also tried to feed an array to the cell (third file) and it gives me the same error, so if I figure out the problem with the first one, I guess I may not even need to use for loop. 

 

Thanks,

Baran.

0 Kudos
Message 13 of 21
(2,352 Views)

Baran,

 

Pay attention when and how often you open and close a reference.

 

- References opened outside the for loop must be close after the for loop.

- References opened in the for loop must be closed in the for loop.

 

Paul

0 Kudos
Message 14 of 21
(2,347 Views)

I think I have done that. I closed "_worksheet" and "range" inside the loop and the others outside (in try1 file). Could you save the file compatible with 2009 labview? 

 

Thanks,

Baran.

0 Kudos
Message 15 of 21
(2,341 Views)
Message 16 of 21
(2,339 Views)

Thanks. It works now. I just don't understand why the "_worksheet" should be closed outside the loop?

 

Thanks again.

 

 

0 Kudos
Message 17 of 21
(2,334 Views)

The Worksheet Reference is opened by using the Invoke Node Sheets/Item (just before the for loop). The reference is only passed through _Worksheet. And the reference is used in each for loop iteration. If you close it in the loop (it happens in the first loop iteration), in the second iteration the _Worksheet/Range/Cell1/Cell2 generates an error because the reference was previously closed.

0 Kudos
Message 18 of 21
(2,330 Views)

OK. I see.

 

Thanks.

0 Kudos
Message 19 of 21
(2,322 Views)

Hey, 

I am trying to "shift" or move my picture into a certain spot in excel. I am able to move it by typing the right coordinates through the "shapes" box, but its not really efficient and convinient for me. 

Is there a way to tell the picture to move into a certain cell instead of adjusting the coordinates using the "Shapes" box?? 

 

Thanks

0 Kudos
Message 20 of 21
(2,246 Views)