반응형
<?
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>";
?>
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>";
?>
반응형