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.
Owner: |
Nobody in particular
|
Requestors: |
dorian [...] cpan.org
|
Cc: |
|
AdminCc: |
|
|
Severity: |
(no value)
|
Broken in: |
(no value)
|
Fixed in: |
(no value)
|
errors
excel4-samples.tar.gz
|
Thu Jul 08 13:18:47 2010
dorian [...] cpan.org - Ticket created
I have what purports to be an Excel file from 1994 that fails to parse
with the following error:
substr outside of string at
/usr/local/share/perl/5.10.0/Spreadsheet/ParseExcel.pm line 1633.
A quick look at the module yields the following:
$oWkS->{HeaderMargin} = _convDval( substr( $sWk, 16, 8 ) );
$oWkS->{FooterMargin} = _convDval( substr( $sWk, 24, 8 ) );
...presumably the format has changed since the mid-90s? ;)
Unfortunately I can't release the offending file, since it contains
sensitive information. If you have any insight into where that method
fits into the format spec, however, I'm content to submit a patch.
Thanks!
As requested:
Perl version : 5.010000
OS name : linux
Module versions: (not all are required)
Spreadsheet::ParseExcel 0.57
Scalar::Util 1.21
Unicode::Map 0.112
Spreadsheet::WriteExcel 2.25
Parse::RecDescent 1.962.2
File::Temp 0.22
OLE::Storage_Lite 0.19
IO::Stringy 2.110
Tue Jul 13 04:39:53 2010
jmcnamara [...] cpan.org - Correspondence added
Hi,
If the file contains sensitive information delete it out. In fact you
can probably delete all the worksheets and data apart from the error
throwing header and footer.
It is almost impossible to debug these issues without a sample Excel file.
John.
--
Tue Jul 13 04:39:53 2010
The RT System itself - Status changed from 'new' to 'open'
Tue Jul 13 16:17:43 2010
dorian.taylor [...] gmail.com - Correspondence added
On 13-Jul-10, at 1:39 AM, John McNamara via RT wrote:
Show quoted text> <URL:
https://rt.cpan.org/Ticket/Display.html?id=59204 >
>
> Hi,
>
> If the file contains sensitive information delete it out. In fact you
> can probably delete all the worksheets and data apart from the error
> throwing header and footer.
>
> It is almost impossible to debug these issues without a sample Excel
> file.
>
> John.
Fair enough; my concern with modifying the file was that it would stop
doing whatever it was doing to cause the parser to break. I found a
copy of Excel 4.0 on an abandonware site; I'll see if I can get it to
work in Wine and get back to you.
--
Dorian Taylor
http://doriantaylor.com/
Tue Jul 13 18:38:10 2010
dorian [...] cpan.org - Correspondence added
On Tue Jul 13 04:39:53 2010, JMCNAMARA wrote:
Show quoted text> Hi,
>
> If the file contains sensitive information delete it out. In fact you
> can probably delete all the worksheets and data apart from the error
> throwing header and footer.
>
> It is almost impossible to debug these issues without a sample Excel file.
>
> John.
Okay. It's Excel 4, not 5, I was mistaken. I found it on an abandonware
site and luckily it contained a bunch of samples, so I attached them.
If you run over the samples with the following oneliner you can see the
errors for yourself:
find excel4-samples/ -name \*.XLS -exec perl -MSpreadsheet::ParseExcel
-wle 'warn $ARGV[0]; warn Spreadsheet::ParseExcel->new->parse($ARGV[0])'
{} \; 2>errors
Most of the files generate errors which are consistent with the one I
experienced originally. One parses successfully, QE/EMP.XLS, however
it's worth noting that it spews out a bunch of uninitialized value
warnings, which you can see in the errors file.
Regards,
Dorian
Message body not shown because it is not plain text.
Message body not shown because it is not plain text.
Tue Aug 24 20:51:53 2010
jmcnamara [...] cpan.org - Correspondence added
On Tue Jul 13 18:38:10 2010, DORIAN wrote:
Show quoted text> On Tue Jul 13 04:39:53 2010, JMCNAMARA wrote:
> > Hi,
> >
> > If the file contains sensitive information delete it out. In fact you
> > can probably delete all the worksheets and data apart from the error
> > throwing header and footer.
> >
> > It is almost impossible to debug these issues without a sample Excel file.
> >
> > John.
>
> Okay. It's Excel 4, not 5, I was mistaken. I found it on an abandonware
> site and luckily it contained a bunch of samples, so I attached them.
Hi Dorian,
Sorry for taking so long on this.
I've put a workaround in ParseExcel to ignore the Excel 4 record that is causing the problem.
The changes are in the ParseExcel repo on GitHub:
http://github.com/jmcnamara/spreadsheet-parseexcel
You can download the updated version and test it from there. Use the "Download source"
button.
John.
--
Tue Sep 21 05:18:45 2010
jmcnamara [...] cpan.org - Correspondence added
Fixed in Spreadsheet::ParseExcel version 0.58.
Thanks,
John.
--
Tue Sep 21 05:18:46 2010
jmcnamara [...] cpan.org - Status changed from 'open' to 'resolved'