getValue();$a=iconv("UTF-8","GB">
时间:2021-07-01 10:21:17 帮助过:9人阅读
for($j=3;$j<=$highestRow;$j++)//表头不读取
{
$a = $objPHPExcel->getActiveSheet()->getCell("A".$j)->getValue();
$a=iconv("UTF-8","GBK//IGNORE",$a);//转码
$b = $objPHPExcel->getActiveSheet()->getCell("B".$j)->getValue();
$b=iconv("UTF-8","GBK//IGNORE",$b);//转码
//$c = $objPHPExcel->getActiveSheet()->getCell("C".$j)->getValue();
//$d = $objPHPExcel->getActiveSheet()->getCell("D".$j)->getValue();
//$e = $objPHPExcel->getActiveSheet()->getCell("E".$j)->getValue();
$sql = "INSERT INTO paee_course VALUES('".$a."','".$b."')";//,".$c.",".$d.",".$e."
echo $sql."$j";
mysql_query($sql);
/*if(!mysql_query($sql))
{
re_result("导入数据失败,请稍后再试或与管理员联系");
}*/
}