Check worksheet protection

29 views
Skip to first unread message

djibel

unread,
Oct 28, 2011, 6:27:25 AM10/28/11
to Spreadsheet::ParseExcel
Dear,

First of all, Good job for the module. It is very nice.

I want to read an excel file, but I want to check if the file that I
read have a password protection in a worksheet. Why ?
Because I am using Excel::Writer::XLSX to write an excel file with
password protection in a worksheet to protect some cells. After some
modifications from users, I read this file to extract some
informations.
Before extraction, I want to check that the file that I am reading is
the real file that I had created with à protection and the same
password worksheet protection.
In documentation, I have seen this : $parser = Spreadsheet::ParseExcel-
>new( Password => 'secret' );
But I think it is just to open A excel file with WORKBOOK protection.
Have you ideas to resolv my problem ?

Best Regards,

DJIBEL

jmcnamara

unread,
Oct 28, 2011, 7:27:33 AM10/28/11
to Spreadsheet::ParseExcel

On Oct 28, 11:27 am, djibel <genom...@gmail.com> wrote:
> I want to read an excel file, but I want to check if the file that I
> read have a password protection in a worksheet. Why ?
> Because I am using Excel::Writer::XLSX to write an excel file with
> password protection in a worksheet to protect some cells. After some
> modifications from users, I read this file to extract some
> informations.
> Before extraction, I want to check that the file that I am reading is
> the real file that I had created with à protection and the same
> password worksheet protection.

Hi Djibril,

Unfortunately, Spreadsheet::ParseExcel cannot read/parse XLSX files.
There is a Excel::Reader::XLSX module planned for the next few months
but work on it hasn't started yet.

Since an XLSX files is a collection of XML files in a zip container
you can probably work out a way to read it your self with Archive::Zip
and one of the XML:: modules.

Regards,

John.
--

djibel

unread,
Oct 28, 2011, 9:29:00 AM10/28/11
to spreadsheet...@googlegroups.com
Ok, thank you.
I will try to unzip xlsx file to see xml files and parse it with XML::Twig.

Good luck for Excel::Reader::XLSX.
Reply all
Reply to author
Forward
0 new messages