php 将 Excel 工作表导入 mysql cakephp 1.3

标签 php mysql excel cakephp import

我将在客户提供的 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/

相关文章:

excel - 创建全局文件路径

mysql - 无法在 Excel for Mac 2016 中加载 macOS Connector/MySQL ODBC 驱动程序

PHP电子表格在浏览器选项卡中显示空白

mysql - yii 输出格式日期时间

php - PHP 中多个参数的语法是什么?

mysql - 如何将 mysql 列名打印到文件中

PHP/CSS - 检测 nl2br 中断

VBA:AdvancedFilter 在 AutoFilter 之后获取唯一值

php - fetch_all 或 fetch_assoc MySQLi 语句

php - 只逃避必要的东西,这可能吗?