Beefy Boxes and Bandwidth Generously Provided by pair Networks
Perl Monk, Perl Meditation
 
PerlMonks  

Password Protect Excel File

by thimi3 (Initiate)
on Nov 25, 2009 at 00:30 UTC ( [id://809241]=perlquestion: print w/replies, xml ) Need Help??

thimi3 has asked for the wisdom of the Perl Monks concerning the following question:

Hi, I am trying to use perl to password protect an excel file; basically when they try to open the file; it will prompt the user to add the password. I was able to protect the wrksheet but not the spreadsheet Is this double in perl I am using Linux OS

Replies are listed 'Best First'.
Re: Password Protect Excel File
by jmcnamara (Monsignor) on Nov 25, 2009 at 00:54 UTC

    Since you are on Linux and can password protect the worksheets I'm going to guess that you are using Spreadsheet::WriteExcel. In which case, password protection of a workbook isn't supported.

    Currently, there isn't any available workaround using Spreadsheet::WriteExcel.

    --
    John.

      Correct, I am using the Spreadsheet::WriteExcel module; but it is not quiet what I am looking for. Are you aware of any other method that can be used?
        thimi3,
        Are you aware of any other method that can be used?

        Perhaps you missed where jmcnamara, the author of the module said - "Currently, there isn't any available workaround using Spreadsheet::WriteExcel."

        The documentation has this to say:

        Note, the worksheet level password in Excel provides very weak protection. It does not encrypt your data in any way and it is very easy to deactivate. Therefore, do not use the above method if you wish to protect sensitive data or calculations. However, before you get worried, Excel's own workbook level password protection does provide strong encryption in Excel 97+. For technical reasons this will never be supported by Spreadsheet::WriteExcel.

        I am not aware of any module that doesn't run on Win32 that does what you want. If you find one, please share.

        Cheers - L~R

Re: Password Protect Excel File
by leocharre (Priest) on Nov 25, 2009 at 19:25 UTC

    How about encrypt the file. Leave it up to the user to decrypt, and then use as a regular file. Oh, wait- your bosses that be just want this to work in their magical fantasy land, right?

    This would be a solution that actually works, there's no crazyness about it or losing sleep about if you did it right or not.

    Here's some stuff worth looking over..

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: perlquestion [id://809241]
Approved by biohisham
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others browsing the Monastery: (3)
As of 2024-04-20 01:35 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found