I want to protect excel file by password in php code

Discussion in 'PHP' started by afsnau, Aug 28, 2010.

  1. #1
    Hi,
    I am generating excel file(.xls) by PHP code , but now my requirement is that to protect this excel by password .
    I want to protect some column by password, by this no one able to edit some specific column without password eg. where we perform some calculation (formula) .

    Plz reply
    Thanks
     
    afsnau, Aug 28, 2010 IP
  2. georgiivanov

    georgiivanov Member

    Messages:
    62
    Likes Received:
    3
    Best Answers:
    0
    Trophy Points:
    25
    #2
    How do you generate the excel file?

    I recommend you to use PEAR's module Spreadsheet_Excel_Writer: http://pear.php.net/package/Spreadsheet_Excel_Writer

    Here is an example how to generate the file: http://pear.php.net/manual/en/package.fileformats.spreadsheet-excel-writer.intro.php
    And you should consider the method protect: http://pear.php.net/manual/en/packa...preadsheet-excel-writer-worksheet.protect.php

     
    georgiivanov, Aug 28, 2010 IP