arunks, Corion gave you some good advice in the chatterbox, recorded here for posterity: "Maybe How do I make password prompts not echo back the user?? Or simply read it from STDIN".
If I were to be solving the problem, especially after the advice already given in the thread, I would go to the documentation for Spreadsheet::ParseXLSX, which then directs you to the details in Spreadsheet::ParseExcel, which shows the syntax for giving options to the ->new(%opt) call. I would then code up the simplistic read-from-STDIN prompt (a single print and a single read from STDIN), and pass the result from that read into the the appropriate portion of Spreadsheet::ParseXLSX->new(%opt). Including using the modules, everything from using modules to instantiating the parser per the linked documentation took 6 lines -- and that's because I read into a variable instead of combining the read with the ->new(...), and counted the two lines for using strict and warnings.
After you've made an honest attempt at writing those 6 lines for yourself, you might want to look at Tutorials, especially Getting Started with Perl and Basic debugging checklist. If you're still having trouble moving forward, post your code, along with what errors you are getting, and ask specific questions.
| [reply] [d/l] [select] |
If you download the module Spreadsheet::ParseXLSX and look in the tests folder, 't', you'll find a file called encryption.t which has example code for opening password protected spreadsheets.
| [reply] [d/l] [select] |
ok I will try this. But before opening an excel file prompt should come and ask for password to open the excel file.am looking for password protection only not encryption the file.am seeing some cell value ..why is that. Please confirm.
my $cell = $worksheet->get_cell(1, 1);
is($cell->value, 'abcdefgABCDEFG');
| [reply] |
| [reply] [d/l] |