LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Moving Excel chart to a specific location in the Active sheet

Solved!
Go to solution

I've been given permission to include the 'Define Cell' VI.  It can handle any cell within a sheet - even up to IV,65536 (the very last one)!  The '$ row?' and '$ column?' inputs are so that you can create a specific cell reference - eg: F$7.  This is useful if you are then going to be copying a formula (including the specific cell) across several cells.

 

Hope it helps.

 

James



Never say "Oops." Always say "Ah, interesting!"

0 Kudos
Message 11 of 18
(1,720 Views)

Hi James,

 

Thanks for all your help. It was very thorough and well explained. The Define Cell VI will come in very handy. I have good Labview experience but I'm a complete beginner to Active X type commands. I am able to  move the chart to a specific cell but I am having difficulty in the cutting and pasting of a chart which isn't essential to my application anymore but I would like to know how to do this. I don't think the issue is with the cut and paste commands however. My main issue is in selecting a previously made chart and performing an operation on it. For example if I want to add a series to a previously made chart, I can't seem to get a valid refnum for the chart. I have posted the VI I'm working with already. It works fine up to the Chart invoke node. I can an unknown error then which prevents me making any changes like adding a series to the chart. Any ideas?

 

Thanks again,

lms17

0 Kudos
Message 12 of 18
(1,718 Views)

Hmm...  I've only got LabVIEW 6.1, and so can't open your VI created in version 8.2.1

 

Do you know how (and if) i could open it?  Otherwise a picture or two will be the only way i can see what you're doing. Smiley Sad



Never say "Oops." Always say "Ah, interesting!"

0 Kudos
Message 13 of 18
(1,716 Views)

Hi,

 

I have attached a jpeg of the piece of code where the error occurs. I have put a breakpoint around the invoke node that produces the error. I have also attached the explanation of the error. Everything works fine up to the breakpoint. The ChartObject property node works fine as well. I tried changing the height of the chart and it worked. However when I use the Chart property to get a refnum for the Chart property/invoke nodes, these nodes don't work.

 

Rgds,

lms17

Download All
0 Kudos
Message 14 of 18
(1,713 Views)

Hi,

 

I have attached a jpeg of the piece of code where the error occurs. I have put a breakpoint around the invoke node that produces the error. I have also attached the explanation of the error. Everything works fine up to the breakpoint. The ChartObject property node works fine as well. I tried changing the height of the chart and it worked. However when I use the Chart property to get a refnum for the Chart property/invoke nodes, these nodes don't work.

 

Rgds,

lms17

Download All
0 Kudos
Message 15 of 18
(1,713 Views)
Solution
Accepted by topic author lms17

As far as i know, you don't need to keep activating everything you work on.  Excel is quite happy doing everything in the background.  Why, it could even do the lot so that you never saw excel open!

 

Anyway, i think that by simply removing the problematic invoke node, you could get rid of your problem entirely.  As an aside, you could probably do away with the 'Activate' invoke nodes too - I don't think they're really necessary.

 

James



Never say "Oops." Always say "Ah, interesting!"

Message 16 of 18
(1,699 Views)

I removed all the activates and the select nodes and it worked fine for me.

 

Thank you.

0 Kudos
Message 17 of 18
(1,689 Views)

Glad to be of service! Smiley Happy  I hope you find that 'Define Cell' VI useful too.

 

James



Never say "Oops." Always say "Ah, interesting!"

0 Kudos
Message 18 of 18
(1,686 Views)