-
-
Notifications
You must be signed in to change notification settings - Fork 233
Open
Description
希望使用固定内存模式写入。但是$excel->data()没法像insertDate一样设置dateFormat
发现导出的时候占用内存还是很大。到5gb了
...
$config = ['path' => dirname($filePath)];
$excel = new Excel($config);
$excel->constMemory(basename($filePath), 'Sheet1', false);
if ($this->isDateType($mapping->fieldType)) {
$excel->insertDate($row, $col, $timestamp, 'yyyy-mm-dd hh:mm:ss', $format);
} else {
if ($format === null) {
$excel->insertText($row, $col, (string) $value);
} else {
$excel->insertText($row, $col, $value, null, $format);
}
}
...
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels