mirror of
https://gitee.com/ulthon/ulthon_admin.git
synced 2026-07-01 15:32:48 +08:00
修改导出格式强制为字符串;
This commit is contained in:
@@ -2,6 +2,8 @@
|
||||
|
||||
namespace app\common\tools;
|
||||
|
||||
use PhpOffice\PhpSpreadsheet\Cell\DataType;
|
||||
|
||||
class ExcelTools
|
||||
{
|
||||
public static function exportModel($model, $where = [], $fields = [], $image_fields = [], $select_fields = [])
|
||||
@@ -70,7 +72,7 @@ class ExcelTools
|
||||
$cel = $value;
|
||||
}
|
||||
|
||||
$sheet->setCellValue($col_key . $write_line, $cel);
|
||||
$sheet->setCellValueExplicit($col_key . $write_line, $cel,DataType::TYPE_STRING);
|
||||
$write_col++;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user