in reply to Spreadsheet::WriteExcel crashing Excel97
The solution is to ensure that you write a formatted blank to other cells in the merged range as follow:
#!/usr/bin/perl -w use strict; use Spreadsheet::WriteExcel; my $workbook = Spreadsheet::WriteExcel->new('test.xls'); my $worksheet = $workbook->addworksheet(); $worksheet->set_row($_, 30) for (1..11); $worksheet->set_column('B:D', 20); my $format = $workbook->addformat( border => 6, bold => 1, color => 'red', valign => 'vcenter', align => 'center', ); $worksheet->write('B2', 'Some text here', $format); $worksheet->write_blank('C2', $format); $worksheet->write_blank('D2', $format); $worksheet->write_blank('B3', $format); $worksheet->write_blank('C3', $format); $worksheet->write_blank('D3', $format); $worksheet->merge_cells('B2:D3');
If this doesn't fix your problem then send me an email.
--
John.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Re: Spreadsheet::WriteExcel crashing Excel97
by Anonymous Monk on Aug 27, 2002 at 01:19 UTC |