dedecms织梦后台增加批量上传和导出报表的功能(3)

                                     $name = $xls->sheets[0]['cells'][$i][1];  

                                     $mobile = $xls->sheets[0]['cells'][$i][2]  

                                     $data_values .= "('$name','$mobile'),";  

                             }  

                             $data_values = substr($data_values,0,-1);  

                             $sql= "INSERT INTO dede_test (name,mobile) VALUES $data_values";  

                            $dsql->ExecuteNoneQuery($sql);  

                             $lastInsertID = $dsql->GetLastID();  

                         if($dsql){  

                                ShowMsg("成功导入!","test.php");  

                         }else{  

                                ShowMsg("导入失败!","test.php");  

                         }  

                     }  

                   exit();  

    ?>  


dede后台导出demo,点击下载 PHP导出xls

内容版权声明:除非注明,否则皆为本站原创文章。

转载注明出处:https://www.heiqu.com/ed4d974c0141d279cd0506656420436a.html