php导入Excel工作表到mysql cakephp 1.3(php Import Excel sheet to mysql cakephp 1.3)

编程入门 行业动态 更新时间:2024-10-24 08:27:03
php导入Excel工作表到mysql cakephp 1.3(php Import Excel sheet to mysql cakephp 1.3)

我将在客户提供的Excel sheet有数百万条记录,我在CakePHP 1.3版本中找到了一个更好的现成组件或帮助程序,可以import excel sheet to 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.

Please let me know earliest response with better solution.

最满意答案

您需要使用PHP-Excel-Reader

为此,您必须在Vendor文件夹中添加excel reader库,例如vendor \ php-excel-reader和yourdatafile.xls应该在webroot文件夹下

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

You need to use PHP-Excel-Reader

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); }

更多推荐

本文发布于:2023-08-07 21:49:00,感谢您对本站的认可!
本文链接:https://www.elefans.com/category/jswz/34/1466414.html
版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。
本文标签:工作   mysql   php   Excel   Import

发布评论

评论列表 (有 0 条评论)
草根站长

>www.elefans.com

编程频道|电子爱好者 - 技术资讯及电子产品介绍!