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: |
rbo [...] cpan.org
|
Cc: |
|
AdminCc: |
|
|
Severity: |
Normal |
Broken in: |
2.37 |
Fixed in: |
(no value)
|
|
Sun Apr 29 13:00:34 2012
rbo [...] cpan.org - Ticket created
Hi,
merge_range doesn't adjusts the height, with text_wrap is true and newlines (\n). But write with
format does.
My example is attached.
Thanks
Robert
#!/usr/bin/env perl
use warnings;
use strict;
use Spreadsheet::WriteExcel;
my $workbook = Spreadsheet::WriteExcel->new( $0 . '.xls');
my $worksheet = $workbook->add_worksheet('Main');
my $content = "Merged cells with newline.\nCreated with:";
my $format01 = $workbook->add_format(merge => 1,text_wrap => 1,);
$worksheet->write(0, 0, $content . "write" , $format01);
$worksheet->write(0, 1, '', $format01);
my $format = $workbook->add_format( merge => 1,text_wrap => 1,);
$worksheet->merge_range('A2:B2', $content . "merge_range", $format);
$workbook->close();
__END__
Fri May 04 07:24:10 2012
jmcnamara [...] cpan.org - Correspondence added
On Sun Apr 29 13:00:34 2012, rbo wrote:
Show quoted text> merge_range doesn't adjusts the height, with text_wrap is true and
> newlines (\n). But write with format does.
Hi Robert,
Strictly speaking Spreadsheet::WriteExcel never adjusts the row height
when text_wrap is set.
The effect that you see with write() is just something that Excel does
is text is wrapped and the row settings are at their default values.
However, it isn't guaranteed behaviour and in the case of the merge
range it doesn't do it at all.
So, unfortunately you'll need to set the height or the merged rows
explicitly.
This is a bug in Spreadsheet::WriteExcel because there isn't any
setting in the Excel file that it produces that can make Excel scale
the row heights automatically. It is just a fortunate side effect that
works in some cases.
Regards,
John.
--
Fri May 04 07:24:11 2012
The RT System itself - Status changed from 'new' to 'open'
Fri May 04 07:25:50 2012
jmcnamara [...] cpan.org - Correspondence added
Show quoted text> This is a bug in Spreadsheet::WriteExcel because there isn't any
> setting in the Excel file that it produces that can make Excel
> scale the row heights automatically. It is just a fortunate side
> effect that works in some cases.
Sorry, I meant to say this *isn't* a bug in Spreadsheet::WriteExcel ...
Fri May 04 09:06:58 2012
rbo [...] cpan.org - Correspondence added
Thanks for the fast response.
Excel is strange. ;-)
OK, what a bummer! I think that we can close the ticket.
Fri May 04 11:35:08 2012
jmcnamara [...] cpan.org - Correspondence added
On Fri May 04 09:06:58 2012, rbo wrote:
Show quoted text> Thanks for the fast response.
>
> Excel is strange. ;-)
>
> OK, what a bummer! I think that we can close the ticket.
Will do.
Thanks for the report.
Regards,
John.
--
Fri May 04 11:35:17 2012
jmcnamara [...] cpan.org - Status changed from 'open' to 'resolved'