Рекурсивный акроним словосочетания «PHP: Hypertext Preprocessor»
Добро пожаловать на форум PHP программистов!
За последние 24 часа нас посетили 17149 программистов и 1834 робота. Сейчас ищет 1671 программист ...
Worksheet::setMerge
Вернуться к: Spreadsheet_Excel_Writer
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 )
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(0, 0, 'Cell Start', $format);
// Merge cells from row 0, col 0 to row 2, col 2
$worksheet->setMerge(0, 0, 2, 2);
$workbook->send('SetMerge.xls');
$workbook->close();
?>
Вернуться к: Spreadsheet_Excel_Writer