php Import Excel sheet to mysql cakephp 1.3

2019-08-29 04:21发布

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.

3条回答
干净又极端
2楼-- · 2019-08-29 04:38

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

}
查看更多
淡お忘
3楼-- · 2019-08-29 04:44

I havent found a Plugin for CakePHP which does extensive work.

But you can use PHP Excel as vendors and just import it into the controller and go ahead and do everything.

查看更多
SAY GOODBYE
4楼-- · 2019-08-29 04:50

try using it

It works fine for me. Hope it helps u too

查看更多
登录 后发表回答