<?
define(db_host, "localhost");
define(db_user, "root");
define(db_pass, "");
define(db_link, mysql_connect(db_host, db_user, db_pass));
define(db_name, "test");
mysql_select_db(db_name);
$excel = new COM("Excel.Application") or die("Excel could not be started");
ini_set('max_execution_time','120');
$excel -> Visible = 0;
$excel -> DisplayAlerts = 0;
$data = $excel -> Workbooks -> Open("C:\userlist.xls");
$Sheets = $data -> Worksheets(1);
for($i = 3; $i <= 5; $i++){
for($x = 1; $x <= 3; $x++){
$Cell = $Sheets -> Cells($i, $x);
$Cell -> activate;
switch($x){
case 1; $name = $Cell -> value; break;
case 2; $username = $Cell -> value; break;
case 3; $country = $Cell -> value; break;
}
}
$SQL = mysql_query("INSERT INTO members VALUES(NULL, '$name', '$username', '$country')");
}
$excel -> Quit();
?>
also you can see more information and some graphics about above...
http://www.websoldier.net/index.php?...&article_id=51