LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

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

I am writing code that modifies an existing excel sheet however, it opens excel file every time I run the code.  I just want to modify the excel sheet without opening it

Download All
0 Kudos
Message 1 of 22
(3,150 Views)

@xochitlga wrote:

I am writing code that modifies an existing excel sheet however, it opens excel file every time I run the code.  I just want to modify the excel sheet without opening it


You don't need to make Excel visible to edit a worksheet. This property can be set via ActiveX.

0 Kudos
Message 2 of 22
(3,141 Views)

Hello,


Change the 'True' constant wired to the property node that specifies 'Visible' to 'False'.

 

Joel C

National Instruments

0 Kudos
Message 3 of 22
(3,110 Views)

Thanks that worked, however now I want to continue edit the excel sheet without getting the following message:

 

PSU Test.xls is already open.  Reopening will cause any changes you made to be discarded.  Do you want to reopen PSU Test.xls?

0 Kudos
Message 4 of 22
(3,101 Views)

@xochitlga wrote:

Thanks that worked, however now I want to continue edit the excel sheet without getting the following message:

 

PSU Test.xls is already open.  Reopening will cause any changes you made to be discarded.  Do you want to reopen PSU Test.xls?


I cannot view your VI since you are LabVIEW 2011, but you are apparently not closing that file.

0 Kudos
Message 5 of 22
(3,091 Views)

I have attached 2009 version does that work for you?

Download All
0 Kudos
Message 6 of 22
(3,087 Views)

I have 8.6

0 Kudos
Message 7 of 22
(3,085 Views)

here you go

Download All
0 Kudos
Message 8 of 22
(3,080 Views)

I don't see anything in your VI that closes the Excel file and shuts down Excel.

 

Have you looked at  Help -> Examples on how to work with Excel with ActiveX?

0 Kudos
Message 9 of 22
(3,071 Views)

I have added a close workbook and quit excel invoke node, but I am still getting messages like these:

 

Do you want to save changes you made to 'test_2.xlsx'?

 

Like I mentioned before I want to continue to edit and save the excel sheet without anny pop up message

Download All
0 Kudos
Message 10 of 22
(3,054 Views)