数据类型读取
编译
./configure --enable-reader类型数组说明
[
2 => \Vtiful\Kernel\Excel::TYPE_TIMESTAMP,
]示例
$config = ['path' => './tests'];
$excel = new \Vtiful\Kernel\Excel($config);
// 导出测试文件
$filePath = $excel->fileName('tutorial.xlsx')
->header(['Item', 'Cost'])
->output();
// 打开测试文件 和 第一个工作表
$excel->openFile('tutorial.xlsx')
->openSheet();
// 读取每行单元格数据时,可指定每个单元格数据类型进行读取
var_dump($excel->nextRow([
\Vtiful\Kernel\Excel::TYPE_STRING,
\Vtiful\Kernel\Excel::TYPE_STRING
]));Last updated