diff --git a/Application/Admin/Controller/SocietyInfoController.class.php b/Application/Admin/Controller/SocietyInfoController.class.php index 85a72bd25..f64a126c8 100644 --- a/Application/Admin/Controller/SocietyInfoController.class.php +++ b/Application/Admin/Controller/SocietyInfoController.class.php @@ -620,13 +620,13 @@ class SocietyInfoController extends ThinkController //创建PHPExcel对象,注意,不能少了\ $PHPExcel=new \PHPExcel(); //如果excel文件后缀名为.xls,导入这个类 -// if($exts == 'xls'){ + if($exts == 'xls'){ //import("Org.Util.PHPExcel.Reader.Excel5"); $PHPReader=new \PHPExcel_Reader_Excel5(); -// }else if($exts == 'xlsx'){ -// //import("Org.Util.PHPExcel.Reader.Excel2007"); -// $PHPReader=new \PHPExcel_Reader_Excel2007(); -// } + }else if($exts == 'xlsx'){ + //import("Org.Util.PHPExcel.Reader.Excel2007"); + $PHPReader=new \PHPExcel_Reader_Excel2007(); + } //载入文件 $PHPExcel=$PHPReader->load($filename); //获取表中的第一个工作表,如果要获取第二个,把0改为1,依次类推 diff --git a/Application/Admin/View/SocietyInfo/lists.html b/Application/Admin/View/SocietyInfo/lists.html index f17dbc3e8..c7c6e72db 100644 --- a/Application/Admin/View/SocietyInfo/lists.html +++ b/Application/Admin/View/SocietyInfo/lists.html @@ -396,7 +396,7 @@ var oReq = new XMLHttpRequest(); var formFile = new FormData(); - formFile.append("excelData", fileObj,"excelData.xlsx"); //加入文件对象 + formFile.append("excelData", fileObj); //加入文件对象 layer.confirm('【提示】是否确认导入公会信息', { btn: ['确认','取消'],