Skip to content

Commit

Permalink
chore: phpoffice 驱动添加callbackData回调
Browse files Browse the repository at this point in the history
  • Loading branch information
kanyxmo committed Jul 22, 2024
1 parent 7a41445 commit 76aa71b
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/Excel/PhpOffice.php
Original file line number Diff line number Diff line change
Expand Up @@ -116,6 +116,9 @@ public function export(string $filename, array|\Closure $closure, ?\Closure $cal
while ($generate->valid()) {
$column = 0;
$items = $generate->current();
if ($callbackData instanceof \Closure) {
$items = $callbackData($items);
}
foreach ($items as $name => $value) {
$columnRow = $this->getColumnIndex($column) . $row;
$annotation = '';
Expand Down

0 comments on commit 76aa71b

Please sign in to comment.