<?php // 作成日 2008/09/30 require_once("Spreadsheet/Excel/Writer.php"); $workbook = new Spreadsheet_Excel_Writer('./sheet/sample12-1.xls'); $format1 =& $workbook->addFormat(array('Size'=>10, 'Align'=>'center')); $format2 =& $workbook->addFormat(array('Size'=>15, 'Color'=>'blue')); $worksheet =& $workbook->addWorksheet('シート1'); $worksheet->writeString(0, 0, 'バナナ', $format1); $worksheet->writeNumber(0, 1, 86, $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/sample12-1.xls">Excelファイル</a></p>'); print('</body></html>'); ?>