in reply to set_align() of merged cells in Spreadsheet::WriteExcel
However, you can obtain the effect that you want be using the merge_cells() method. This gives you access to some of the features of Excel 97+ merging.
Specify the alignment as "right", ignore the "merge" property and force alignment using the merge_cells() method:
The documentation and examples will be clearer on this in the next release.#!/usr/bin/perl -w use strict; use Spreadsheet::WriteExcel; my $workbook = Spreadsheet::WriteExcel->new("reload.xls"); my $worksheet = $workbook->addworksheet(); my $format = $workbook->addformat( align => 'right', border => 2 ); $worksheet->merge_cells("B4:D4"); $worksheet->write("B4", "Hello", $format); $worksheet->write("C4", "", $format); $worksheet->write("D4", "", $format);
--
John.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Re: set_align() of merged cells in Spreadsheet::WriteExcel
by Anonymous Monk on Feb 11, 2002 at 00:48 UTC |