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); }更多推荐
发布评论