<?php // 作成日 2008/10/01 require_once("Spreadsheet/Excel/Writer.php"); $workbook = new Spreadsheet_Excel_Writer('./sheet/sample24-1.xls'); $worksheet =& $workbook->addWorksheet('シート1'); $format1 =& $workbook->addFormat(); $format1->setBorder(1); $format1->setBorderColor('red'); $format2 =& $workbook->addFormat(); $format2->setBorder(2); $format2->setTopColor('green'); $format2->setRightColor('yellow'); $format2->setLeftColor('cyan'); $format2->setBottomColor('blue'); $worksheet->writeString(1, 1, '東京都', $format1); $worksheet->writeString(3, 1, '大阪府', $format2); $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/sample24-1.xls">Excelファイル</a></p>'); print('</body></html>'); ?>