'php로 엑셀'에 해당되는 글 1건

  1. 2008.11.24 php->Excel reader

php->Excel reader

PHP 2008. 11. 24. 10:41

<?
require_once 'Excel/reader.php';
$data = new Spreadsheet_Excel_Reader();
$data->setOutputEncoding('CP949'); // 이부분만 바꿨습니다.
$data->read('kortest.xls');

error_reporting(E_ALL ^ E_NOTICE);
echo "<table border=1>";
for ($i = 1; $i <= $data->sheets[0]['numRows']; $i++) {
echo "<tr>";
for ($j = 1; $j <= $data->sheets[0]['numCols']; $j++) {
echo "<td> ".$data->sheets[0]['cells'][$i][$j]."</td>";
}
echo "</tr>\n";
}
echo "</table>";
?>
Posted by 철냄비짱
,