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: |
jmcnamara [...] cpan.org
|
Requestors: |
jmcnamara [...] cpan.org
|
Cc: |
|
AdminCc: |
|
|
Severity: |
(no value)
|
Broken in: |
(no value)
|
Fixed in: |
0.60 |
|
Sun Aug 23 19:13:18 2009
jmcnamara [...] cpan.org - Taken
Sun Aug 23 19:13:41 2009
jmcnamara [...] cpan.org - Correspondence added
Sun Aug 23 19:13:42 2009
jmcnamara [...] cpan.org - Status changed from 'new' to 'resolved'
Tue Oct 22 17:48:37 2013
DOUGW [...] cpan.org - Correspondence added
On Sun Aug 23 19:13:41 2009, JMCNAMARA wrote:
Show quoted text> Fixed in version 0.52.
CellHandler is still a package variable and not local to the object. So, e.g., you cannot begin to parse a file using CellHandler, and then parse another file, and continue parsing the first file. Attached is a patch that makes CellHandler,NotSetCell,and Object instance variables.
--- Spreadsheet-ParseExcel-0.59/lib/Spreadsheet/ParseExcel.pm Wed Apr 6 11:53:57 2011
+++ Spreadsheet-ParseExcel-0.59-fix/lib/Spreadsheet/ParseExcel.pm Tue Oct 22 14:34:51 2013
@@ -155,9 +155,6 @@
our $BIGENDIAN;
our $PREFUNC;
-our $_CellHandler;
-our $_NotSetCell;
-our $_Object;
our $_use_perlio;
#------------------------------------------------------------------------------
@@ -201,9 +198,9 @@
$self->SetEventHandler( $sKey, $hParam{AddHandlers}->{$sKey} );
}
}
- $_CellHandler = $hParam{CellHandler} if ( $hParam{CellHandler} );
- $_NotSetCell = $hParam{NotSetCell};
- $_Object = $hParam{Object};
+ $self->{CellHandler} = $hParam{CellHandler};
+ $self->{NotSetCell} = $hParam{NotSetCell};
+ $self->{Object} = $hParam{Object};
if ( defined $hParam{Password} ) {
@@ -516,6 +513,9 @@
my $workbook = Spreadsheet::ParseExcel::Workbook->new();
$workbook->{SheetCount} = 0;
+ $workbook->{CellHandler} = $self->{CellHandler};
+ $workbook->{NotSetCell} = $self->{NotSetCell};
+ $workbook->{Object} = $self->{Object};
my ( $biff_data, $data_length ) = $self->_get_content( $source, $workbook );
return undef if not $biff_data;
@@ -2412,21 +2412,21 @@
$oCell->{Rich} = \@aRich;
}
- if ( defined $_CellHandler ) {
- if ( defined $_Object ) {
+ if ( defined $oBook->{CellHandler} ) {
+ if ( defined $oBook->{Object} ) {
no strict;
- ref( $_CellHandler ) eq "CODE"
- ? $_CellHandler->(
+ ref( $oBook->{CellHandler} ) eq "CODE"
+ ? $oBook->{CellHandler}->(
$_Object, $oBook, $oBook->{_CurSheet}, $iR, $iC, $oCell
)
- : $_CellHandler->callback( $_Object, $oBook, $oBook->{_CurSheet},
+ : $oBook->{CellHandler}->callback( $_Object, $oBook, $oBook->{_CurSheet},
$iR, $iC, $oCell );
}
else {
- $_CellHandler->( $oBook, $oBook->{_CurSheet}, $iR, $iC, $oCell );
+ $oBook->{CellHandler}->( $oBook, $oBook->{_CurSheet}, $iR, $iC, $oCell );
}
}
- unless ( $_NotSetCell ) {
+ unless ( $oBook->{NotSetCell} ) {
$oBook->{Worksheet}[ $oBook->{_CurSheet} ]->{Cells}[$iR][$iC] = $oCell;
}
return $oCell;
Tue Oct 22 17:50:14 2013
DOUGW [...] cpan.org - Correspondence added
Tue Oct 22 17:50:14 2013
DOUGW [...] cpan.org - Status changed from 'resolved' to 'open'
Tue Oct 22 18:15:55 2013
jmcnamara [...] cpan.org - Correspondence added
On Tue Oct 22 17:50:14 2013, DOUGW wrote:
Show quoted text> Trying to reopen...
>
Hi Douglas,
I'm not really updating this module any more and have put it up for adoption.
If you don't want the patch to be forgotten it is probably best to set up a Pull Request on GitHub:
https://github.com/jmcnamara/spreadsheet-parseexcel
John
Thu Oct 31 14:46:58 2013
DOUGW [...] cpan.org - Correspondence added
On Tue Oct 22 18:15:55 2013, JMCNAMARA wrote:
Show quoted text>
> I'm not really updating this module any more and have put it up for
> adoption.
>
> If you don't want the patch to be forgotten it is probably best to set
> up a Pull Request on GitHub:
I've forked and created a pull request. Although I don't entirely know what I'm doing on github, if you want to give me comaint status on this library, that'd be fine.
Mon Nov 04 19:24:40 2013
jmcnamara [...] cpan.org - Correspondence added
On Thu Oct 31 14:46:58 2013, DOUGW wrote:
Show quoted text> On Tue Oct 22 18:15:55 2013, JMCNAMARA wrote:
> >
> > I'm not really updating this module any more and have put it up for
> > adoption.
> >
> > If you don't want the patch to be forgotten it is probably best to
> > set
> > up a Pull Request on GitHub:
>
> I've forked and created a pull request. Although I don't entirely know
> what I'm doing on github, if you want to give me comaint status on
> this library, that'd be fine.
Hi Doug,
Thanks for that.
Sorry, I've been backed up with work. I'll merge the PR and set you up with co-maintenance rights in the next few days.
John
Wed Jan 01 09:54:41 2014
jmcnamara [...] cpan.org - Correspondence added
On Mon Nov 04 19:24:40 2013, JMCNAMARA wrote:
Show quoted text> On Thu Oct 31 14:46:58 2013, DOUGW wrote:
> > I've forked and created a pull request.
Show quoted text> Hi Doug,
>
> Thanks for that.
>
> Sorry, I've been backed up with work. I'll merge the PR and set you up
> with co-maintenance rights in the next few days.
Hi Doug,
It took a bit longer to get around to this than anticipated.
Anyway a new year is a good time to start with something new. :-)
I've given you co-maint rights on Pause and merged in any outstanding PRs on GitHub.
If you like you can bring your fork up to date with mine and push a CPAN release from that. See below for my low-tech release procedure.
John
UPDATE CHANGELOG
vi Changes
CHANGE VERSIONS
find lib -name *.pm|xargs perl -i -pe 's/(\$VERSION\s+= .)\d\.\d+/${1}0.59/'
perl -i -pe 's/0\.58/0.59/' META.yml
# Check dates changes
git diff | egrep '^\+' | perl -pe 's{\+\+\+ b/}{\n}'
Make TEST
export RELEASE_TESTING=1
make test
export RELEASE_TESTING=0
MAKE CHECKS
git status
make distcheck
make dist
cpants_lint.pl Spreadsheet-ParseExcel-0.59.tar.gz
Release
http://pause.perl.org/pause/query
cpan-upload Spreadsheet-ParseExcel-0.59.tar.gz
git status
git add .
git status
git commit -m "Prep for release 0.59."
git push origin master
git tag CPAN_0.59
git push --tags
Wed Feb 26 18:13:21 2014
DOUGW [...] cpan.org - Correspondence added
On Wed Jan 01 09:54:41 2014, JMCNAMARA wrote:
Show quoted text> On Mon Nov 04 19:24:40 2013, JMCNAMARA wrote:
>
> It took a bit longer to get around to this than anticipated.
It's taken me a while to get up to speed on github :-)
Anyway, this one is fixed, and will hopefully close some more tickets soon.
Wed Feb 26 18:13:21 2014
DOUGW [...] cpan.org - Status changed from 'open' to 'resolved'