linwin
2015-06-30 21:15
照着老师的代码运行,居然是错的?!
代码
$dir=dirname(__file__);
require $dir."/phpexcel/phpexcel.php";
$objPHPExcel=new PHPExcel();
$objsheet=$objPhPExcel->getActiveSheet();//此行为第5行
$objsheet->setTitle("demo");
$objSheet->setcellValue("A1","姓名")->setCellValue("B1","分数");
$objWriter=PHPExcel_IOFactory::createWriter($objPHPExcel,"Excel5");
$objWriter->save("demo.xls");
错误提示:Notice: Undefined variable: objPhPExcel in D:\WWW\demo.php on line 5
一个是 $objPHPExce 一个是$objPhPExcel?
PHPExcel探索之旅
32702 学习 · 121 问题
相似问题
回答 2
回答 2