 |
|
|  |
¿¢¼¿(*.xls) ÈÀÏÀ» PHP¿¡¼ Àбâ |
|
|
 |
13³â Àü |
1. http://sourceforge.net/projects/phpexcelreader/ ¿¡¼ Spreadsheet_Excel_Reader¸¦ ´Ù¿î ¹Þ½À´Ï´Ù.
2. ¼Ò½º¸¦ º¸¸é »ç¿ë¹ýÀº ±×³É ¾Ë ¼ö ÀÖ½À´Ï´Ù.
3. ÇѱÛ󸮰¡ ¾ÈµÇ´Â ¹®Á¦µµ ½±°Ô ¹ß°ßÇÒ ¼ö ÀÖ½À´Ï´Ù.
4. ¾Æ·¡¿Í °°ÀÌ »ç¿ëÇϸé Çѱ۵µ 󸮰¡ µË´Ï´Ù.
<?
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>";
?>
|
|
̵̧ : 731 |
̵̧
¸ñ·Ï
|
|
|  |
|