One of the side effects of this is that Spreadsheet::WriteExcel will
support full Excel 97 style images.
A pre-release is available that includes support for PNG images that
are compatible with cell comments, OpenOffice and Gnumeric. You can
download it here:
http://homepage.eircom.net/~jmcnamara/perl/prerel/Spreadsheet-WriteExcel-2.19.1.tar.gz
The module now has a new worksheet method called insert_image() that
is called as follows:
$worksheet->insert_image('B4', 'ourlogo.png');
The method takes the same parameters as insert_bitmap(), see the docs.
The insert_bitmap() method will be deprecated. See also the demo.pl
and images.pl programs in the examples directory of the distro.
Some benefits of the new image handling are:
* Support for PNG, JPG and BMP.
* Compatibility with OpenOffice and Gnumeric.
* Images can be selected in Excel.
* Repeated image are stored only once, thus reducing file size.
* Compatible with cell comments.
Some temporary caveats before the full release:
* Requires Digest::MD5 to be installed.
* Only PNG supported.
* Image scaling not active.
* Some of the tests fail.
I would be grateful if as many people as possible could try this out
and let me know of any problems.
John.
--
http://homepage.eircom.net/~jmcnamara/perl/embedded_chart.jpg
This was generated using an external template in a manner similar to
the existing chart mechanism:
http://search.cpan.org/~jmcnamara/Spreadsheet-WriteExcel-2.18/charts/charts.pod
Here is the code:
#!/usr/bin/perl -w
use strict;
use Spreadsheet::WriteExcel;
my $workbook = Spreadsheet::WriteExcel->new('aaa_001.xls');
my $worksheet = $workbook->add_worksheet();
$worksheet->store_formula('=Sheet1!A1');
$worksheet->write_col('A1', [ [1, 2],
[2, 3],
[3, 4],
[4, 5],
[5, 6],
]);
$worksheet->embed_chart('E3', 'chart01.bin');
This isn't in the above pre-release yet. It will be when it is a
little more stable.
John.
--
What a good day, a new release of WE !
I will test the pre-rel and let you know if I found some bugs.
bty do you plan to add autofilters in this new release ?
Thanks again for this excellent distro.
Sylvain.