Worksheet::setMerge

Worksheet::setMerge – Sets a merged cell range

Synopsis

require_once 'Spreadsheet/Excel/Writer/Worksheet.php';

void Worksheet::setMerge ( integer $first_row , integer $first_col , integer $last_row , integer $last_col )

Description

This package is not documented yet.

Parameter

integer $first_row

First row of the area to merge

integer $first_col

First column of the area to merge

integer $last_row

Last row of the area to merge

integer $last_col

Last column of the area to merge

Throws

throws no exceptions thrown

Note

This function can not be called statically.

Example

Using setMerge()

<?php
require_once 'Spreadsheet/Excel/Writer.php';

$workbook  = new Spreadsheet_Excel_Writer();
$worksheet $workbook->addWorksheet('SetMerge');

// Sets the color of a cell's content
$format $workbook->addFormat();
$format->setFgColor(10);
$worksheet->write(00'Cell Start'$format);

// Merge cells from row 0, col 0 to row 2, col 2
$worksheet->setMerge(0022);
   
$workbook->send('SetMerge.xls');
$workbook->close();
?>