<?php
// 作成日 2008/10/01
require_once("Spreadsheet/Excel/Writer.php");

$workbook = new Spreadsheet_Excel_Writer('./sheet/sample21-1.xls');
$worksheet =& $workbook->addWorksheet('シート1');

$format1 =& $workbook->addFormat();
$format1->setBold();
$format2 =& $workbook->addFormat();
$format2->setItalic();
$format3 =& $workbook->addFormat();
$format3->setBold();
$format3->setItalic();

$worksheet->writeString(0, 0, '標準');
$worksheet->writeString(1, 0, '太字', $format1);
$worksheet->writeString(2, 0, '斜体', $format2);
$worksheet->writeString(3, 0, '太字+斜体', $format3);
$workbook->close();

print('<html>');
print('<head>');
print('<meta http-equiv="Content-Type" content="text/html;charset=Shift_JIS" />');
print('</head>');
print('<body>');
print('<p><a href="./sheet/sample21-1.xls">Excelファイル</a></p>');
print('</body></html>');
?>