getActiveSheet();//获得当前活动的sheet$objSheet->setTitle("demo");$array=array( array("姓名","分数"), array("李四","60"), array("张三","90"), );$objSheet->fromArray($array);$objwriter=PHPExcel_IOFactory::createWriter($objPHPExcel,"Excel2007");$objwriter->save($dir."/demo.xlsx");