php导入Excel工作表到mysql cakephp 1.3 [英] php Import Excel sheet to mysql cakephp 1.3

查看:134
本文介绍了php导入Excel工作表到mysql cakephp 1.3的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我将在我的 Excel表中有数百万条记录由客户提供,我在 CakePHP 1.3中找到一个更好的现成组件或帮助器 c> $ 版本到将excel表导入MySQL 数据库记录。

I will have millions of records in my Excel sheet provided by client, and I am finding a better ready made component or helper in CakePHP 1.3 version to import excel sheet to MySQL database records.

请让我知道earliest

Please let me know earliest response with better solution.

推荐答案

您需要使用 PHP-Excel-Reader

您必须在供应商中添加excel阅读器库文件夹像这个vendors \ php-excel-reader和yourdatafile.xls应该在webroot文件夹下

For that you have to add excel reader library in your Vendor folder like this vendors\php-excel-reader and yourdatafile.xls should be under webroot folder

function index(){
App::import('Vendor', 'php-excel-reader/excel_reader2');
$data = new Spreadsheet_Excel_Reader('yourdatafile.xls', true);

}

这篇关于php导入Excel工作表到mysql cakephp 1.3的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆