in reply to Re^9: protect excel file in perl script
in thread protect excel file in perl script

installed perl-Spreadsheet-ParseExcel.x86_64 0.3200-3.el5 we have this module version installed on Linux v5.8.8. our code is not making password protection excel sheets do we need to upgrade perl version or module version.please advice
  • Comment on Re^10: protect excel file in perl script

Replies are listed 'Best First'.
Re^11: protect excel file in perl script
by poj (Abbot) on Mar 15, 2017 at 11:54 UTC

    What error messages are you getting ?

      NO error throwing in my code.Making Password protection functionality is not working on my perl version v5.8.8 and current installed parse excel module version: perl-Spreadsheet-ParseExcel.x86_64 0.3200-3.el5 #!/usr/bin/perl -w use strict; use Spreadsheet::ParseExcel; my $file='/home/muthum/excel1.xls'; my $parser = Spreadsheet::ParseExcel->new( Password => 'secret' ); my $workbook = $parser->Parse($file);

        Try

        #!/usr/bin/perl -w use strict; use Spreadsheet::ParseExcel; my $file = '/home/muthum/excel1.xls'; my $parser = Spreadsheet::ParseExcel->new( Password => 'secret' ); my $workbook = $parser->Parse($file); if ( !defined $workbook ) { die $parser->error(), "\n"; } for my $worksheet ( $workbook->worksheets() ) { my $cell = $worksheet->get_cell( 0, 0 ); next unless $cell; print "[A1] = ", $cell->value(),"\n"; }
        poj