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: |
Nobody in particular
|
Requestors: |
HMBRAND [...] cpan.org
|
Cc: |
|
AdminCc: |
|
|
Severity: |
(no value)
|
Broken in: |
(no value)
|
Fixed in: |
(no value)
|
|
Mon Jun 20 12:32:12 2011
HMBRAND [...] cpan.org - Ticket created
t/13_date_seconds.t ........... 1/104
# Failed test ' Testing incorrect time:
1899-12-31T00:00:59.9999999999999999999 incorrect secs caught.'
# at t/13_date_seconds.t line 87.
t/13_date_seconds.t ........... 55/104 # Looks like you failed 1 test of
104.
t/13_date_seconds.t ........... Dubious, test returned 1 (wstat 256,
0x100)
Failed 1/104 subtests
This is perl 5, version 14, subversion 1 (v5.14.1) built for
IA64.ARCHREV_0-LP64-ld
Tue Jun 21 19:23:22 2011
jmcnamara [...] cpan.org - Correspondence added
On Mon Jun 20 12:32:12 2011, HMBRAND wrote:
Show quoted text> t/13_date_seconds.t ........... 1/104
> # Failed test ' Testing incorrect time:
> 1899-12-31T00:00:59.9999999999999999999 incorrect secs caught.'
> # at t/13_date_seconds.t line 87.
Hi Merijn,
Thanks for the rigorous testing (as always).
That test is meant to fail (and thereby pass due to the negation) when 59.999~ gets rounded
(with Excel's precision) to 60 which isn't a valid number of seconds.
I guess on your longdouble system the precision is maintained and the test passes (and
thereby fails).
It is a fairly harmless failure.
How many more 9s would I have to add to the test vector to get it to fail on your system?
John.
--
Tue Jun 21 19:23:23 2011
The RT System itself - Status changed from 'new' to 'open'
Wed Jun 22 02:54:26 2011
h.m.brand [...] xs4all.nl - Correspondence added
On Tue, 21 Jun 2011 19:23:23 -0400, "John McNamara via RT"
<bug-Spreadsheet-WriteExcel@rt.cpan.org> wrote:
Show quoted text> <URL:
https://rt.cpan.org/Ticket/Display.html?id=68954 >
>
> On Mon Jun 20 12:32:12 2011, HMBRAND wrote:
> > t/13_date_seconds.t ........... 1/104
> > # Failed test ' Testing incorrect time:
> > 1899-12-31T00:00:59.9999999999999999999 incorrect secs caught.'
> > # at t/13_date_seconds.t line 87.
>
> Hi Merijn,
>
> Thanks for the rigorous testing (as always).
>
> That test is meant to fail (and thereby pass due to the negation) when 59.999~ gets rounded
> (with Excel's precision) to 60 which isn't a valid number of seconds.
>
> I guess on your longdouble system the precision is maintained and the test passes (and
> thereby fails).
>
> It is a fairly harmless failure.
>
> How many more 9s would I have to add to the test vector to get it to fail on your system?
On that system, 14 '9's or more, but I do have a generic solution ...
Tested on
5.10.1 IA64.ARCHREV_0-LP64
5.14.1 IA64.ARCHREV_0
5.14.1 IA64.ARCHREV_0-LP64-ld
5.14.1 i686-linux-64int-ld
5.12.3 i586-linux-thread-multi
--8<--- t-13.diff
--- t/13_date_seconds.t 2009-11-29 07:35:48 +0100
+++ z 2011-06-22 08:50:53 +0200
@@ -82,7 +82,8 @@ $date_time = '1899-12-31T00:00:60.000';
$fail = ! $worksheet->convert_date_time($date_time);
ok($fail, " Testing incorrect time: $date_time\tincorrect secs caught.");
-$date_time = '1899-12-31T00:00:59.9999999999999999999';
+$date_time = '1899-12-31T00:00:59.999999999999999999';
+$date_time .= "9" x length (1 - 1e-16);
$fail = ! $worksheet->convert_date_time($date_time);
ok($fail, " Testing incorrect time: $date_time\tincorrect secs caught.");
-->8---
The reasoning behind this:
Show quoted text> gperl32 -wle'print 1-1e-14'
0.99999999999999
Show quoted text> gperl32 -wle'print 1-1e-16'
1
Show quoted text> gperl64 -wle'print 1-1e-14'
0.99999999999999
Show quoted text> gperl64 -wle'print 1-1e-16'
0.9999999999999999
I hope I'm evil enough :)
--
H.Merijn Brand
http://tux.nl Perl Monger
http://amsterdam.pm.org/
using 5.00307 through 5.14 and porting perl5.15.x on HP-UX 10.20, 11.00,
11.11, 11.23 and 11.31, OpenSuSE 10.1, 11.0 .. 11.4 and AIX 5.2 and 5.3.
http://mirrors.develooper.com/hpux/ http://www.test-smoke.org/
http://qa.perl.org http://www.goldmark.org/jeff/stupid-disclaimers/
Wed Nov 21 15:43:37 2012
jmcnamara [...] cpan.org - Correspondence added
Fixed in version 2.38 on its way to CPAN.
Thanks.
Wed Nov 21 15:43:38 2012
jmcnamara [...] cpan.org - Status changed from 'open' to 'resolved'