I use PHP dbase extention to read dbase files and upload them into MySQP.
My Code:
if(dbase_open($FileDir,0)){
$dbOpen = dbase_open($FileDir,0);
$records = dbase_numrecords($dbOpen);
$qry = "";
$qry = "INSERT INTO ".$Table." (`SCADA`, `Date`, `PlantNo`, `State`, `SubState`, `Frequency`) VALUES ";
for ($i=1; $i<=$records; $i++){
$rows = dbase_get_record_with_names($dbOpen,$i);
$qry .= '('.$SCADA.','.$rows['Date'].','.$rows['PlantNo'].','.$rows['State'].','.$rows['SubState'].','.$rows['Frequency'].'),';
}
$qry = substr($qry, 0, -1);
$Insert = $conn -> prepare($qry);
$Insert -> execute();
Now I have to do the same but with xls files! I know that I can convert them into csv and import them via PHP, but I have 100 xls files... How can I transfer them to MySQL? Ant idea?