본문으로 바로가기

엑셀파일 읽기(Excel Reader 2.21)

category 윕개발PHP 8년 전

엑셀파일의 데이터를 읽어서 DB에 데이터를 넣거나 처리할 때 많이 이용합니다.

error_reporting(E_ALL ^ E_NOTICE);
require_once 'excel_reader2.php';
$data = new Spreadsheet_Excel_Reader("example.xls");

echo $data->dump(true,true);

<style>
table.excel {
border-style:ridge;
border-width:1;
border-collapse:collapse;
font-family:sans-serif;
font-size:12px;
}
table.excel thead th, table.excel tbody th {
background:#CCCCCC;
border-style:ridge;
border-width:1;
text-align: center;
vertical-align:bottom;
}
table.excel tbody th {
text-align:center;
width:20px;
}
table.excel tbody td {
vertical-align:bottom;
}
table.excel tbody td {
    padding: 0 3px;
border: 1px solid #EEEEEE;
}
</style>


http://code.google.com/p/php-excel-reader