previousFormat::setScript (Previous) (Next) ファイルシステムnext

View this page in Last updated: Sun, 21 Jun 2009
English | Brazilian Portuguese | Chinese | Dutch | French | German | Hungarian | Japanese | Polish | Russian | Spanish | Turkish

Format::setFontFamily

Format::setFontFamily – フォントファミリを設定する

Synopsis

require_once "Spreadsheet/Excel/Writer.php";

void Format::setFontFamily ( string $font_family )

Description

フォントファミリを設定します。

Parameter

  • string $font_family - フォントファミリ名。使用可能な値は 'Times New Roman'、'Arial'、'Courier' です。

Note

This function can not be called statically.

Example

setFontFamily() の使用法

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

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

$format_times =& $workbook->addFormat();
$format_times->setFontFamily('Times New Roman');

$format_courier =& $workbook->addFormat();
$format_courier->setFontFamily('Courier');

$worksheet->write(00"Hello World, Arial (default)");
$worksheet->write(10"Hello World, Times New Roman"$format_times);
$worksheet->write(20"Hello World, Courier"$format_courier);

$workbook->send('fonts.xls');
$workbook->close();
?>
previousFormat::setScript (Previous) (Next) ファイルシステムnext

Download Documentation Last updated: Sun, 21 Jun 2009
Do you think that something on this page is wrong? Please file a bug report or add a note.
User Notes:
There are no user contributed notes for this page.