Format::setVAlign -- Set cell alignment.
Описание
Set cell alignment. This is an alternative to setAlign()
Параметр
string
$location -
alignment for the cell
top, vcenter,
bottom, vjustify,
vequal_space.
Заметка
Эта функция не должна вызываться статически.
Пример
Пример 38-1. Using setVAlign() require_once 'Spreadsheet/Excel/Writer.php';
$workbook = new Spreadsheet_Excel_Writer();
$worksheet =& $workbook->addWorksheet();
// justify
$format_justify =& $workbook->addFormat('vAlign' => 'vjustify');
// center the text vertically
$format_center =& $workbook->addFormat('vAlign' => 'vcenter');
// justify and center vertically
$format_justify_center =& $workbook->addFormat();
$format_justify_center->setVAlign('vjustify');
$format_justify_center->setVAlign('vcenter');
$worksheet->write(0, 0, 'justify', $format_justify);
$worksheet->write(1, 0, 'center', $format_center);
$worksheet->write(2, 0, 'jc', $format_justify_center);
$workbook->send('align.xls');
$workbook->close(); |
|
HIVE: All information for read only. Please respect copyright! |
|