This queue is for tickets about the Spreadsheet-WriteExcel CPAN distribution.
Maintainer(s)' notes
If you are reporting a bug in Spreadsheet::WriteExcel 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::WriteExcel
Parse::RecDescent
File::Temp
OLE::Storage_Lite
IO::Stringy
Spreadsheet::ParseExcel
Scalar::Util
Unicode::Map
);
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::WriteExcel (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 but complete example program that demonstrates your problem. The program should be as small as possible. At the same time it should be a complete program that generates an Excel file. If the Spreadsheet::WriteExcel section is part of a much larger program then simplify it down to the essentials. Simulate any DB reads with an array.
5) Say if you tested with Excel, OpenOffice, Gnumeric or something else. Say which version of that application you used.
6) If you are submitting a patch you should check with the author 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::WriteExcel Google Group.
Owner: |
jmcnamara [...] cpan.org
|
Requestors: |
stbaldwin [...] multiservice.com
|
Cc: |
|
AdminCc: |
|
|
Severity: |
(no value)
|
Broken in: |
(no value)
|
Fixed in: |
(no value)
|
|
Wed Nov 05 23:47:16 2014
stbaldwin [...] multiservice.com - Ticket created
Hi,
Firstly, thanks for an awesome module !!
I've encountered what appears to be a bug when closing a large workbook
that was instantiated with a file handle rather than a file name.
The problem is really simple to reproduce. Take the bigfile.pl you
distribute and change it so that it is using a file handle. I've attached
a modified version for your convenience. I'm hoping the attachment makes
it into rt.
I've tested with the latest CPAN version (2.40).
Kind regards,
Steve
--
------------------------------------------------------------------
This email is intended solely for the use of the addressee and may
contain information that is confidential, proprietary, or both.
If you receive this email in error please immediately notify the
sender and delete the email..
------------------------------------------------------------------
Message body is not shown because sender requested not to inline it.
Thu Nov 06 02:43:44 2014
stbaldwin [...] multiservice.com - Ticket #100124: Ticket created
Hi again,
I think the following patch resolves the "problem" ...
stbaldwin@archer:~/Spreadsheet/WriteExcel$ diff -u
/usr/local/share/perl/5.18.2/Spreadsheet/WriteExcel/Workbook.pm .
--- /usr/local/share/perl/5.18.2/Spreadsheet/WriteExcel/Workbook.pm 2013-11-07
11:33:18.000000000 +1100
+++ ./Workbook.pm 2014-11-06 18:29:15.790641331 +1100
@@ -1358,7 +1358,8 @@
# Close the filehandle if it was created internally.
- return CORE::close($self->{_fh_out}) if $self->{_internal_fh};
+ CORE::close($self->{_fh_out}) if $self->{_internal_fh};
+ return 1;
}
else {
# File in greater than limit, set $! to "File too large"
The problem (from our perspective) is that the _store_OLE_file function is
returning undef if the size is > $maxsize and there is no value for
$self->{_internal_fh} (i.e. the workbook was instantiated with a file
handle).
Because we are checking the value returned from $workbook->close, the undef
is causing us to assume there was an error.
Cheers,
Steve
On Thu, Nov 6, 2014 at 3:46 PM, Steve Baldwin <stbaldwin@multiservice.com>
wrote:
Show quoted text> Hi,
>
> Firstly, thanks for an awesome module !!
>
> I've encountered what appears to be a bug when closing a large workbook
> that was instantiated with a file handle rather than a file name.
>
> The problem is really simple to reproduce. Take the bigfile.pl you
> distribute and change it so that it is using a file handle. I've attached
> a modified version for your convenience. I'm hoping the attachment makes
> it into rt.
>
> I've tested with the latest CPAN version (2.40).
>
> Kind regards,
>
> Steve
>
--
------------------------------------------------------------------
This email is intended solely for the use of the addressee and may
contain information that is confidential, proprietary, or both.
If you receive this email in error please immediately notify the
sender and delete the email..
------------------------------------------------------------------
Thu Nov 06 04:04:29 2014
jmcnamara [...] cpan.org - Taken
Thu Nov 06 04:04:53 2014
jmcnamara [...] cpan.org - Ticket #100124: Ticket deleted
Thu Nov 06 04:05:15 2014
jmcnamara [...] cpan.org - Ticket #100124: Taken
Thu Nov 06 04:05:23 2014
jmcnamara [...] cpan.org - Ticket #100124: Status changed from 'deleted' to 'open'
Thu Nov 06 04:05:25 2014
jmcnamara [...] cpan.org - Ticket #100124: Ticket deleted
Thu Nov 06 04:07:09 2014
jmcnamara [...] cpan.org - Ticket #100124: Merged into ticket #100112
Thu Nov 06 04:07:10 2014
jmcnamara [...] cpan.org - Merged into ticket #100112
Thu Nov 06 04:15:16 2014
The RT System itself - Status changed from 'new' to 'open'
Thu Nov 06 04:23:11 2014
stbaldwin [...] multiservice.com - Correspondence added
Thanks a lot for such a quick response John. We are certainly planning on
migrating to the new module but just haven't got there yet.
Cheers,
Steve
On Thu, Nov 6, 2014 at 8:15 PM, John McNamara via RT <
bug-Spreadsheet-WriteExcel@rt.cpan.org> wrote:
Show quoted text
--
------------------------------------------------------------------
This email is intended solely for the use of the addressee and may
contain information that is confidential, proprietary, or both.
If you receive this email in error please immediately notify the
sender and delete the email..
------------------------------------------------------------------
Fri Nov 03 16:40:59 2017
DBOOK [...] cpan.org - Correspondence added
This bug is still present. Unfortunately "migrating to Excel::Writer::XLSX" is not a useful suggestion because that creates XLSX files, not XLS files.