LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

How do I stop excel from opening when I run the following code?

Try something like this.


GCentral
There are only two ways to tell somebody thanks: Kudos and Marked Solutions
Unofficial Forum Rules and Guidelines
"Not that we are sufficient in ourselves to claim anything as coming from us, but our sufficiency is from God" - 2 Corinthians 3:5
0 Kudos
Message 11 of 22
(829 Views)

You are leaving Excel running in the background.

 

Close all your ActiveX references.

 

 

0 Kudos
Message 12 of 22
(822 Views)

I have try all the suggestions mentioned above however, I am still getting the same messages

Download All
0 Kudos
Message 13 of 22
(818 Views)

You have a race as to which Close function happens first.

 

You should use your error wire to determine the order of execution.  And the order of execution should be to close the references in the reverse order of the way they were opened.

0 Kudos
Message 14 of 22
(815 Views)

There is no need for Sequences. Dataflow will work.

 

You are closing your references out of sequence.

 

Again, did you even look at the examples that came with LabVIEW????

0 Kudos
Message 15 of 22
(814 Views)

Thanks for the help

 

But now I am getting the following error:

 

LabVIEW: A null or previously deleted refnum was passed in as an input

0 Kudos
Message 16 of 22
(803 Views)

You're still not getting it.  Pay attention to the order of your green wires.  You are closing the application reference before you are closing the workbook reference.  Plust you are quitting the application and close references in parallel to working with the cells.

 

You also have a race condition by using a local of the indicator called "String".  The local is likely to be read before a value is written to it.

0 Kudos
Message 17 of 22
(796 Views)

Try this.

 

You'll see I tried to sort out the order of objects so you are closing them in the reverse order of the way they were opened.  Also, to make sure that something isn't closed until after it is done being used.

 

I don't understand what you were trying to do with the file open stuff before feeding the workbook filename to the open function.

0 Kudos
Message 18 of 22
(794 Views)

Thanks for all your help, when I run your VI I do not get any error's and the windows explorer shows the xls file was modified, however, when I open it, the cell color has not changed?

0 Kudos
Message 19 of 22
(769 Views)

It worked for me.  Though the one thing I noticed was that the color in Excel is different than the color in LabVIEW.  I think the color coding scheme is different between the two applications.

0 Kudos
Message 20 of 22
(767 Views)