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: |
d.t.rajan [...] ieee.org
|
Cc: |
|
AdminCc: |
|
|
Severity: |
(no value)
|
Broken in: |
(no value)
|
Fixed in: |
(no value)
|
|
Thu May 22 17:49:08 2008
d.t.rajan [...] ieee.org - Ticket created
Hello,
Thank you for writing this module.
I am experiencing a bug where the bg_color is not updated in a for loop. So
the below example results in all the cells with a blue bg_color
This seems to be a bug as I would rather not create a new format var for
each color.
...
@colors = @{$led_pattern_hash{$key}};
for ($i=0; $i<$#colors; $i++) {
if (@colors[$i] == 0){
$led_color_format->set_bg_color('blue');
$led_sheet->write($row,3+$i, @colors[$i], $led_color_format);
}
elsif (@colors[$i] == 1){
$led_color_format->set_bg_color('red');
$led_sheet->write($row,3+$i, @colors[$i], $led_color_format);
}
elsif (@colors[$i] == 2){
$led_color_format->set_bg_color('green');
$led_sheet->write($row,3+$i, @colors[$i], $led_color_format);
}
}
Thanks!
-Darin
Thu May 22 18:08:38 2008
jmcnamara [...] cpan.org - Correspondence added
On Thu May 22 17:49:08 2008, d.t.rajan@ieee.org wrote:
Show quoted text> Hello,
>
> Thank you for writing this module.
>
> I am experiencing a bug where the bg_color is not updated in a for
loop. So
Show quoted text> the below example results in all the cells with a blue bg_color
>
> This seems to be a bug as I would rather not create a new format var for
> each color.
Hi,
That isn't a bug. That is the documented behaviour for a format object:
http://search.cpan.org/~jmcnamara/Spreadsheet-WriteExcel/lib/Spreadsheet/WriteExcel.pm#Working_with_formats
Each, unique colour will require a unique format object.
If you have any further questions post them over at the
Spreadsheet::WriteExcel forum:
http://groups.google.com/group/spreadsheet-writeexcel
P.S., in your code you should be writing $colors[$i] instead of @colors.
:-)
John.
--
Thu May 22 18:08:40 2008
The RT System itself - Status changed from 'new' to 'open'
Thu May 22 18:09:32 2008
jmcnamara [...] cpan.org - Correspondence added
10 min
Thu May 22 18:09:33 2008
jmcnamara [...] cpan.org - Status changed from 'open' to 'resolved'
Thu May 22 18:17:32 2008
d.t.rajan [...] ieee.org - Correspondence added
Hi John,
Thanks for the pointer.
I'm using Tie::Hash::MultiValue, which contains a bug in that it is
returning the array ref for 'value'. Thanks for catching that
-Darin
On Thu, May 22, 2008 at 3:08 PM, John McNamara via RT <
bug-Spreadsheet-WriteExcel@rt.cpan.org> wrote:
Show quoted text
Thu May 22 18:17:34 2008
The RT System itself - Status changed from 'resolved' to 'open'
Thu May 22 18:20:13 2008
jmcnamara [...] cpan.org - Correspondence added
Sorry I should have written "$colors[$i] instead of @colors[$i]" above.
John.
--
Thu May 22 18:20:15 2008
jmcnamara [...] cpan.org - Status changed from 'open' to 'resolved'
Thu May 22 18:21:45 2008
d.t.rajan [...] ieee.org - Correspondence added
np, i understood what you were pointing out.
On Thu, May 22, 2008 at 3:20 PM, John McNamara via RT <
bug-Spreadsheet-WriteExcel@rt.cpan.org> wrote:
Show quoted text
Thu May 22 18:21:48 2008
The RT System itself - Status changed from 'resolved' to 'open'
Thu May 22 18:33:55 2008
jmcnamara [...] cpan.org - Status changed from 'open' to 'resolved'