Skip Menu |

Preferred bug tracker

Please visit the preferred bug tracker to report your issue.

This queue is for tickets about the Spreadsheet-ParseExcel CPAN distribution.

Maintainer(s)' notes

If you are reporting a bug in Spreadsheet::ParseExcel here are some pointers

1) State the issues as clearly and as concisely as possible. A simple program or Excel test file (see below) will often explain the issue better than a lot of text.

2) Provide information on your system, version of perl and module versions. The following program will generate everything that is required. Put this information in your bug report.

    #!/usr/bin/perl -w

    print "\n    Perl version   : $]";
    print "\n    OS name        : $^O";
    print "\n    Module versions: (not all are required)\n";

    my @modules = qw(
                      Spreadsheet::ParseExcel
                      Scalar::Util
                      Unicode::Map
                      Spreadsheet::WriteExcel
                      Parse::RecDescent
                      File::Temp
                      OLE::Storage_Lite
                      IO::Stringy
                    );

    for my $module (@modules) {
        my $version;
        eval "require $module";

        if (not $@) {
            $version = $module->VERSION;
            $version = '(unknown)' if not defined $version;
        }
        else {
            $version = '(not installed)';
        }

        printf "%21s%-24s\t%s\n", "", $module, $version;
    }

    __END__

3) Upgrade to the latest version of Spreadsheet::ParseExcel (or at least test on a system with an upgraded version). The issue you are reporting may already have been fixed.

4) Create a small example program that demonstrates your problem. The program should be as small as possible. A few lines of codes are worth tens of lines of text when trying to describe a bug.

5) Supply an Excel file that demonstrates the problem. This is very important. If the file is big, or contains confidential information, try to reduce it down to the smallest Excel file that represents the issue. If you don't wish to post a file here then send it to me directly: jmcnamara@cpan.org

6) Say if the test file was created by Excel, OpenOffice, Gnumeric or something else. Say which version of that application you used.

7) If you are submitting a patch you should check with the maintainer whether the issue has already been patched or if a fix is in the works. Patches should be accompanied by test cases.

Asking a question

If you would like to ask a more general question there is the Spreadsheet::ParseExcel Google Group.

Report information
The Basics
Id: 47978
Status: resolved
Priority: 0/
Queue: Spreadsheet-ParseExcel

People
Owner: Nobody in particular
Requestors: guillaume.yziquel [...] citycable.ch
Cc:
AdminCc:

Bug Information
Severity: (no value)
Broken in: (no value)
Fixed in: (no value)



Subject: Cannot parse password-protected Excel files.
Date: Fri, 17 Jul 2009 16:36:21 +0200
To: bug-Spreadsheet-ParseExcel [...] rt.cpan.org
From: Guillaume Yziquel <guillaume.yziquel [...] citycable.ch>
Hello. I have tried to use Spreadsheet::ParseExcel to parse password-protected Excel files. The module was unable to parse the spreadsheet. Unfortunately, I am not allowed to give out the spreadsheet, and I do not have Excel to make a password-protected file. By password-protected, I mean that I can read the file in OpenOffice, but not write to the file. Spreadsheet::ParseExcel version: 0.4900 perl -v: perl, v5.10.0 built for x86_64-linux-gnu-thread-multi x86_64 GNU/Linux, Debian distribution. All the best, Guillaume Yziquel.
On Fri Jul 17 10:40:45 2009, guillaume.yziquel@citycable.ch wrote: Show quoted text
> Hello. > > I have tried to use Spreadsheet::ParseExcel to parse password-protected > Excel files. The module was unable to parse the spreadsheet.
Hi Guillaume, Password protected files cannot be parsed by WriteExcel. A future release will indicate that the file in password protected and return an appropriate error code but it is unlikely that the module will ever be able to read protected files. John. --
On Fri Jul 17 10:40:45 2009, guillaume.yziquel@citycable.ch wrote: Show quoted text
> Hello. > > I have tried to use Spreadsheet::ParseExcel to parse password-protected > Excel files. The module was unable to parse the spreadsheet.
Hi Guillaume, Password protected files cannot be parsed by WriteExcel. A future release will indicate that the file in password protected and return an appropriate error code but it is unlikely that the module will ever be able to read protected files. John. --
Subject: Re: [rt.cpan.org #47978] Cannot parse password-protected Excel files.
Date: Tue, 08 Sep 2009 08:31:38 +0200
To: bug-Spreadsheet-ParseExcel [...] rt.cpan.org
From: Guillaume Yziquel <guillaume.yziquel [...] citycable.ch>
John McNamara via RT a écrit : Show quoted text
> <URL: https://rt.cpan.org/Ticket/Display.html?id=47978 > > > On Fri Jul 17 10:40:45 2009, guillaume.yziquel@citycable.ch wrote:
>> Hello. >> >> I have tried to use Spreadsheet::ParseExcel to parse password-protected >> Excel files. The module was unable to parse the spreadsheet.
> > Hi Guillaume, > > Password protected files cannot be parsed by WriteExcel. > > A future release will indicate that the file in password protected and return an appropriate > error code but it is unlikely that the module will ever be able to read protected files. > > John.
Hello. Thank you for your answer. Just to be sure that we're talking about the same thing: I'm simply concerned about reading with ParseExcel. Not about WriteExcel. By the way, what is the reason behind this 'unlikely'? Just to know. All the best, -- Guillaume Yziquel http://yziquel.homelinux.org/
On Tue Sep 08 02:36:43 2009, guillaume.yziquel@citycable.ch wrote: Show quoted text
> > Thank you for your answer. Just to be sure that we're talking about > the > same thing: I'm simply concerned about reading with ParseExcel. Not > about WriteExcel.
Hi Guillaume, WriteExcel was a typo due to muscle memory. I am the author of that module and the maintainer of ParseExcel. Show quoted text
> By the way, what is the reason behind this 'unlikely'? Just to know.
It probably would be possible to decrypt the input Excel file if the user supplied the password. At least for some of the Excel encryption schemes. It may also be possible to read weakly (XOR) encrypted Excel files without a password. However, there is a reasonable amount of technical difficulty associated with this as well as a the time required to implement and test the feature. In addition, it isn't a frequently requested feature. At the moment there are more pressing, and far more basic, issues that need to be resolved in ParseExcel. So for those reasons, I would say that it is unlikely. John. --
Subject: Re: [rt.cpan.org #47978] Cannot parse password-protected Excel files.
Date: Thu, 10 Sep 2009 21:32:55 +0200
To: bug-Spreadsheet-ParseExcel [...] rt.cpan.org
From: Guillaume Yziquel <guillaume.yziquel [...] citycable.ch>
John McNamara via RT a écrit : Show quoted text
> > Hi Guillaume, > > WriteExcel was a typo due to muscle memory. I am the author of that > module and the maintainer of ParseExcel. >
>> By the way, what is the reason behind this 'unlikely'? Just to know.
> > It probably would be possible to decrypt the input Excel file if the > user supplied the password. At least for some of the Excel encryption > schemes. It may also be possible to read weakly (XOR) encrypted Excel > files without a password.
OK. My issue was much simpler: It was a password protected file that forbid people to modify areas on the sheets. But one could read them transparentyl in, say, OpenOffice.org. The encryption wasn't meant to stop the worksheet from being read. At all... and that's why I was disappointed with ParseExcel on this specific issue. Show quoted text
> However, there is a reasonable amount of technical difficulty associated > with this as well as a the time required to implement and test the feature. > > In addition, it isn't a frequently requested feature. At the moment > there are more pressing, and far more basic, issues that need to be > resolved in ParseExcel.
OK. Show quoted text
> So for those reasons, I would say that it is unlikely. > > John.
Thanks for your work. -- Guillaume Yziquel http://yziquel.homelinux.org/
On Thu Sep 10 15:38:18 2009, guillaume.yziquel@citycable.ch wrote: Show quoted text
> > OK. My issue was much simpler: It was a password protected file that > forbid people to modify areas on the sheets. But one could read them > transparentyl in, say, OpenOffice.org.
Hi Guillaume, Hmm, ParseExcel should be able to read files like that. Could you send me an example file? Send it to the email address in the docs. If it contains sensitive data you can delete it. Just leave enough data to demonstrate the problem. John. --
As of version 0.56 you can now trap parse errors as follows: my $parser = Spreadsheet::ParseExcel->new(); my $workbook = $parser->parse('Book1.xls'); if ( !defined $workbook ) { die $parser->error(), ".\n"; } This will allow you to check for encrypted files. It won't let you read them however. Parsing an encrypted Excel is beyond the current scope of Spreadsheet::ParseExcel. John. --