XLSX转为CSV - 常规模式
应用场景
函数原型
putCSV(resource $handler): boolresource $handler
示例
$config = ['path' => './tests'];
$excel = new \Vtiful\Kernel\Excel($config);
$filePath = $excel->fileName('tutorial.xlsx', 'TestSheet1')
->header(['Item', 'Cost'])
->data([
['Item_1', 'Cost_1', 10, 10.9999995],
])
->output();
// 写入方式打开,将文件指针指向文件末尾。
$fp = fopen('./tests/file.csv', 'a');
$csvResult = $excel->openFile('tutorial.xlsx')
->openSheet()
->putCSV($fp);Last updated