导出优化
This commit is contained in:
@@ -248,18 +248,18 @@ class CustomerService
|
||||
|
||||
// 创建Excel写入器
|
||||
$writer = new Xlsx($spreadsheet);
|
||||
// $writer->save($filepath);
|
||||
$writer->save('php://output');
|
||||
$excelContent = ob_get_clean();
|
||||
return $excelContent;
|
||||
$writer->save($filepath);
|
||||
// $writer->save('php://output');
|
||||
// $excelContent = ob_get_clean();
|
||||
// return $excelContent;
|
||||
|
||||
// 返回文件信息
|
||||
// return [
|
||||
// 'filename' => $filename,
|
||||
// 'filepath' => $filepath,
|
||||
// 'size' => filesize($filepath),
|
||||
// 'count' => count($customers)
|
||||
// ];
|
||||
// 返回文件信息
|
||||
return [
|
||||
'filename' => $filename,
|
||||
'filepath' => $filepath,
|
||||
'size' => filesize($filepath),
|
||||
'count' => count($customers)
|
||||
];
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user