<?php // 作成日 2008/10/01 require_once("Spreadsheet/Excel/Writer.php"); $workbook = new Spreadsheet_Excel_Writer('./sheet/sample25-1.xls'); $worksheet =& $workbook->addWorksheet('シート1'); $format1 =& $workbook->addFormat(); $format1->setTextRotation(0); $format2 =& $workbook->addFormat(); $format2->setTextRotation(90); $format3 =& $workbook->addFormat(); $format3->setTextRotation(270); $format4 =& $workbook->addFormat(); $format4->setTextRotation(-1); $worksheet->writeString(0, 1, '東京都', $format1); $worksheet->writeString(1, 1, '大阪府', $format2); $worksheet->writeString(0, 3, '愛知県', $format3); $worksheet->writeString(1, 3, '千葉県', $format4); $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/sample25-1.xls">Excelファイル</a></p>'); print('</body></html>'); ?>