On Sep 15, 2:32 am, Oberdan <
oberdan.l...@gmail.com> wrote:
> The generated spreadsheet looks fine when opened with BrOffice
> ( Brazilian version of OpenOffice ), but the text is not wrapped when
> I use Excel 2003. If I use something like:
>
> $WorkSheet->write( 0 , 0 , $Long , $WrapFormat ); instead of
> merge_range, the text gets wrapped correctly. I think I'm missing
> something very simple, but was not able to figure out what is it. Any
> ideas?
Hi Oberdan,
In order to get the wrapped text to display properly in a merged range
you will have to set the height of the row:
...
$WorkSheet->set_row(0, 100);
$WorkSheet->merge_range( 'A1:C1' , $Long , $WrapFormat );
...
OOo sets the row height automatically for the merged wrapped cells but
Excel doesn't. There is no way in the file format to tell Excel to
format the row height automatically. Therefore you will have to
specify an explicit row height to get the effect that you want.
Excel does format the row height automatically in the case of a non-
merged row but again that cannot be controlled by the file format. It
is something that the application does after the file is read.
John.
--