我将在客户提供的 Excel 工作表
中保存数百万条记录,并且我正在 CakePHP 1.3
版本中找到一个更好的现成组件或帮助器 将Excel工作表导入MySQL
数据库记录。
请让我知道最早的回复以及更好的解决方案。
最佳答案
您需要使用PHP-Excel-Reader
为此,您必须在 Vendor 文件夹中添加 excel reader 库,例如 sellers\php-excel-reader,并且 yourdatafile.xls 应位于 webroot 文件夹下
function index(){
App::import('Vendor', 'php-excel-reader/excel_reader2');
$data = new Spreadsheet_Excel_Reader('yourdatafile.xls', true);
}
关于php 将 Excel 工作表导入 mysql cakephp 1.3,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/17186047/