Beefy Boxes and Bandwidth Generously Provided by pair Networks
Do you know where your variables are?

Re^2: password protet excel sheet

by mangrove (Acolyte)
on May 11, 2012 at 21:03 UTC ( #970101=note: print w/replies, xml ) Need Help??

in reply to Re: password protet excel sheet
in thread password protet excel sheet

It never prompts for password to me. Does it for you?.

Replies are listed 'Best First'.
Re^3: password protet excel sheet
by Mr. Muskrat (Canon) on May 11, 2012 at 21:20 UTC

    No, it doesn't prompt for the password. If you want a password, simply pass it as the only argument to protect. In the code you supplied, you protected the worksheet with a password of 'test123'.

    Update: I may have misunderstood your question but runrig answered nicely.

Re^3: password protet excel sheet
by runrig (Abbot) on May 11, 2012 at 21:20 UTC
    When I try to edit any cell, it does not prompt for password, but there is a popup that says something like "this worksheet is protected, you have to unprotect it to edit...". Maybe it depends on version of Excel?
Re^3: password protet excel sheet
by molecules (Monk) on May 11, 2012 at 21:32 UTC
    For my copy of MS Excel 2010 (32-bit) on Windows 7 (64-bit), it works fine. Under this version, to unprotect it, click on "Review" and then click on "Unprotect worksheet". Then it prompts for a password.
      <Thanks for help.>

        So is there any way in perl that I can password protect the excel file? I don't want to use the zip password protect either. So what I am trying to achieve is password protect a excel file that is created using Spreadsheet::WriteExcel. This code is written in unix platform but posted the file in windows.

Log In?

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://970101]
and all is quiet...

How do I use this? | Other CB clients
Other Users?
Others musing on the Monastery: (5)
As of 2018-04-22 20:26 GMT
Find Nodes?
    Voting Booth?