I can't seem to get the write_url_range() function from Spreadsheet::WriteExcel (v. 2.20) to operate as expected:
#!/usr/bin/perl -w
use strict;
use Spreadsheet::WriteExcel;
my $workbook = Spreadsheet::WriteExcel->n
ew("my_exc
elfile.xls
");
my $mysheet = $workbook->add_worksheet("
mysheet");
my $merged_hdr = $workbook->add_format(
align => 'center',
bold => '1',
color => 'blue',
);
#$mysheet->merge_range('M5
:N5', "EC number(s)", $merged_hdr);
## merge_range works correctly; puts token "EC number(s)" in M5:N5 merged cell
#$mysheet->write_url('M5',
"
http://www.chem.qmul.ac.uk/iubmb/enzyme/", "EC number(s)", $merged_hdr);
# write_url works correctly, writes link to
http://www.chem.qmul.ac.uk/iubmb/enzyme/ with token "EC number(s)" at M5.
$mysheet->write_url_range(
'M5:N5', "
http://www.chem.qmul.ac.uk/iubmb/enzyme/", "EC number(s)", $merged_hdr);
## write_url_range fails, puts token with link at M5, no merge -- same result as write_url
__END__
In the example above, I'm trying to merge cells M5 and N5, and have the contents of this merged cell be a link identified as "EC Number(s)". However, the result of write_url_range() is the same as the result of write_url() -- the link and cell title is written correctly, but only to cell M5; no merge occurs.
Anyone have any ideas?
Start Free Trial