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: |
rick [...] measham.id.au
|
Cc: |
|
AdminCc: |
|
|
Severity: |
Important |
Broken in: |
2.37 |
Fixed in: |
(no value)
|
|
Wed Jan 12 18:42:43 2011
http://rick.measham.id.au/ - Ticket created
When an image crosses a cell that has an explicitly set height, or if
the height of such a cell is set later, the image will stretch.
"Resetting" the image in both ooCalc and Excel fixes the problem, but
that's not a solution as I need to email out files that are correct.
Example script shows both changing the row before inserting the image
and changing the row after inserting the image. Both exhibit the same
behaviour.
Changing a column width does not affect the x-scale of the image as seen
on the fourth sheet in the example.
Cheers!
Rick Measham
Perl version : 5.010001
OS name : linux
Module versions: (not all are required)
Spreadsheet::WriteExcel 2.37
Parse::RecDescent 1.963
File::Temp 0.22
OLE::Storage_Lite 0.19
IO::Stringy 2.110
Spreadsheet::ParseExcel 0.58
Scalar::Util 1.23
Unicode::Map (not installed)
#!/usr/bin/perl
use Spreadsheet::WriteExcel;
use LWP::Simple;
# Get us an image to use
unless( -r 'example.png'){
print STDERR "Downloading example image\n";
getstore('
http://www.google.com/intl/en_ALL/images/srpr/logo1w.png', 'example.png');
}
my $workbook = new Spreadsheet::WriteExcel( "example.xls" );
my $page_one = $workbook->add_worksheet('Normal');
$page_one->insert_image( 'B2', 'example.png' );
my $page_two = $workbook->add_worksheet('Resize later');
$page_two->insert_image( 'B2', 'example.png' );
$page_two->set_row( '3:3', 200 );
my $page_three = $workbook->add_worksheet('Resize earlier');
$page_three->set_row( '3:3', 200 );
$page_three->insert_image( 'B2', 'example.png' );
my $page_four = $workbook->add_worksheet('Resize column');
$page_four->set_column( 'C:C', 20 );
$page_four->insert_image( 'B2', 'example.png' );
Message body not shown because it is not plain text.
Wed Jan 12 19:26:24 2011
jmcnamara [...] cpan.org - Correspondence added
On Wed Jan 12 18:42:43 2011,
http://rick.measham.id.au/ wrote:
Show quoted text> When an image crosses a cell that has an explicitly set height, or if
> the height of such a cell is set later, the image will stretch.
Hi,
Thanks for the detailed bug report. I'll look into it.
John.
--
Wed Jan 12 19:26:24 2011
The RT System itself - Status changed from 'new' to 'open'
Wed Jan 12 19:39:36 2011
jmcnamara [...] cpan.org - Correspondence added
On Wed Jan 12 18:42:43 2011,
http://rick.measham.id.au/ wrote:
Show quoted text> When an image crosses a cell that has an explicitly set height, or if
> the height of such a cell is set later, the image will stretch.
Hi,
There is a small error in your program. the set_row() method takes a single row value unlike
set_column() which takes a range. Therefore the lines like this:
$page_two->set_row( '3:3', 200 );
Should be
$page_two->set_row( 3, 200 );
Once, you change that you should get the result that you expect (contrary to the
documentation) whether you set the row or cols before or after you insert the images.
If you have any further problem let me know.
And thanks one more for the detailed example program. You clearly put some effort into it.
John.
--
Wed Jan 12 19:42:37 2011
jmcnamara [...] cpan.org - Correspondence added
P.S., the fact that set_row() doesn't carp about '3:3' could be construed as a bug.
John.
--
Wed Jan 12 20:19:28 2011
http://rick.measham.id.au/ - Correspondence added
Thanks John,
Totally my fault for not reading the set_row() documentation properly.
I've used set_column() and assumed set_row()'s parameters behaved the
same way.
Cheers!
Rick Measham
Thu Jan 13 18:11:11 2011
jmcnamara [...] cpan.org - Correspondence added
On Wed Jan 12 20:19:28 2011,
http://rick.measham.id.au/ wrote:
Show quoted text> Thanks John,
>
> Totally my fault for not reading the set_row() documentation properly.
> I've used set_column() and assumed set_row()'s parameters behaved the
> same way.
Hi Rick,
At least it prompted me to fix the documentation around this issue.
https://github.com/jmcnamara/spreadsheet-
writeexcel/commit/da473f4fce14c7c8959f17913300ac1204c206d6
Thanks,
John.
--
Thu Jan 13 18:11:15 2011
jmcnamara [...] cpan.org - Correspondence added
On Wed Jan 12 20:19:28 2011,
http://rick.measham.id.au/ wrote:
Show quoted text> Thanks John,
>
> Totally my fault for not reading the set_row() documentation properly.
> I've used set_column() and assumed set_row()'s parameters behaved the
> same way.
Hi Rick,
At least it prompted me to fix the documentation around this issue.
https://github.com/jmcnamara/spreadsheet-
writeexcel/commit/da473f4fce14c7c8959f17913300ac1204c206d6
Thanks,
John.
--
Thu Jan 13 18:11:46 2011
jmcnamara [...] cpan.org - Correspondence added
Thu Jan 13 18:11:50 2011
jmcnamara [...] cpan.org - Status changed from 'open' to 'resolved'