LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Labview Excel protect worksheet

I need to protect an excel worksheet, and I use "USERINTERFACEONLY" 

As i also require some formatting such as merge cells and other option I use "ALLOWFORMATTINGCELLS"

But I'm not able to run it... it say unlock and than run.... 

I do not want to unlock do modification and than lock method...

Is there an alternative???

0 Kudos
Message 1 of 5
(3,164 Views)

karthik9 a écrit :

I need to protect an excel worksheet, and I use "USERINTERFACEONLY" 

As i also require some formatting such as merge cells and other option I use "ALLOWFORMATTINGCELLS"

But I'm not able to run it... it say unlock and than run.... 

I do not want to unlock do modification and than lock method...

Is there an alternative???


It would be a lot easyer to help you if you attach your code.

 

Ben64

0 Kudos
Message 2 of 5
(3,124 Views)

@karthik9 wrote:

I need to protect an excel worksheet, and I use "USERINTERFACEONLY" 

As i also require some formatting such as merge cells and other option I use "ALLOWFORMATTINGCELLS"

But I'm not able to run it... it say unlock and than run.... 

I do not want to unlock do modification and than lock method...

Is there an alternative???


I don't understand the problem.  As I understand it, you have protected your Excel Worksheet.  That means that you can't modify it without unlocking it.  So why is it a problem to require you to unlock it, modify it, then re-lock it?

 

The alternative, of course, is not to lock it in the first place.

0 Kudos
Message 3 of 5
(3,071 Views)

Sorry for the long delay...

Now the reason for protection is ..... The Excel sheets updates like every 30 Seconds and this should be visible to the User...

But the User should not modify anything....

The "UserInterfaaceOnly" option helps in doing this.... But as the Excel sheet has to be formatted a bit ("Cannot use Tempelate due to reasons") Merge Cells,Font Color.... Does not work... Which causes an Error to Pop UP....

But as I've seen through various other blogs where people use VB script this problem is solved by setting "AllowFormattingCells" to true....

This doesn't work for me in LABVIEW??????

 

0 Kudos
Message 4 of 5
(3,034 Views)

Try also adding a FALSE constant to the "Contents" input.

 

Ben64

0 Kudos
Message 5 of 5
(3,009 Views)