LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

prevent user from editing excel sheet while running the operation

Hi,

 

I have an application which opens up an excel sheet to save the results.How can I lock it so that while the test is running & results are getting loaded into it,user would be unable to edit the excel?..Once the process gets over, it should allow user to edit it (if needed)..

0 Kudos
Message 1 of 8
(955 Views)

Hi mnx,

 

you can hide Excel by ActiveX calls, so the user will not even notice the Excel workbook/-sheet...

check.png

Best regards,
GerdW

using LV2011SP1 + LV2017 (+LV2020 sometimes) on Win10+cRIO
0 Kudos
Message 2 of 8
(951 Views)

Hi GerdW,

 

Thanks for quick response..

 

I tried doing it but the excel sheet is not getting closed properly if I make it invisible..

0 Kudos
Message 3 of 8
(947 Views)

Hi mnx,

 

for me it runs nice. I hide the Excel sheet from the user and it gets closed properly when I want it to...

Best regards,
GerdW

using LV2011SP1 + LV2017 (+LV2020 sometimes) on Win10+cRIO
0 Kudos
Message 4 of 8
(943 Views)

Hi GerdW,

 

If I open that result excel file, I am getting a dialog box saying that "the file is already open..do you still want to open it?"..what could be wrong with the operation?

0 Kudos
Message 5 of 8
(929 Views)

Hi mnx,

 

that dialog pops up, when you try to open a file that is already opened by another Excel instance.

 

You have to save and close the workbook in Excel programmatically the same way you would do when using Excel "manually"!

Best regards,
GerdW

using LV2011SP1 + LV2017 (+LV2020 sometimes) on Win10+cRIO
0 Kudos
Message 6 of 8
(926 Views)

Hi GerdW,

 

I have saved and closed my file programmatically but that dialog still pops up...However, if I make my file visible, it doesnot pop up(weird but true..Smiley Wink)..Any thoughts on this? 

0 Kudos
Message 7 of 8
(918 Views)

I am getting error 1045 to be specific if I do so....

0 Kudos
Message 8 of 8
(894 Views)