Skip to content

Commit 1d036af

Browse files
authored
Update Excel.php
1 parent d7823a9 commit 1d036af

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

src/Utils/Excel.php

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -90,6 +90,9 @@ public static function toArray(array $row, $replaceFlag = ['*'], $targetFlag = '
9090
// can be call after handleCalculateSheet, will auto calcute cell value
9191
// this line is fallback if not call Excel::handleCalculateSheet($event)
9292
$newValue = preg_replace("/=\"(.*)\"/", '\1', $value);
93+
if (!empty($newValue)) {
94+
$newValue = trim($newValue);
95+
}
9396

9497
$data[$rowKey] = $newValue ?: null;
9598
}

0 commit comments

Comments
 (0)