Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Reading Excel file protected

Status
Not open for further replies.

danvzla

Programmer
Jan 16, 2004
28
FI


Hi experts,

I'm trying to read an excel file password protected using the module "Spreadsheet::parseExcel::Simple". Somebody did this question before but nobody answered

It works fine if the excel file is unprotected. But, if it has the option "Protect and Share workbook activated, the script fails"


use Spreadsheet::parseExcel::Simple;
use OLE::Storage_Lite;


my $workbook = Spreadsheet::parseExcel::Simple->read($excel_file);
my $worksheet = ($workbook->sheets())[2];

while ($worksheet->has_data()) {
my @fields = $worksheet->next_row();
$field1="$fields[1]";
$field2="$fields[2]";
$field3="$fields[3]";
}

I am using Excel 2000.

Thank you
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top