From 64afe93c6e0355e949629734c60222c6c94f17c3 Mon Sep 17 00:00:00 2001 From: isssun <419636081@qq.com> Date: Mon, 22 Jul 2024 09:25:09 +0800 Subject: [PATCH] =?UTF-8?q?PhpOffice=20=E5=AF=BC=E5=87=BA=E6=97=B6?= =?UTF-8?q?=E8=B0=83=E7=94=A8=20$callbackData=20=E5=9B=9E=E8=B0=83?= =?UTF-8?q?=E5=87=BD=E6=95=B0=E5=A4=84=E7=90=86=E6=95=B0=E6=8D=AE?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/Excel/PhpOffice.php | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/Excel/PhpOffice.php b/src/Excel/PhpOffice.php index 3ae4a2b..14cfe48 100644 --- a/src/Excel/PhpOffice.php +++ b/src/Excel/PhpOffice.php @@ -116,6 +116,9 @@ public function export(string $filename, array|\Closure $closure, ?\Closure $cal while ($generate->valid()) { $column = 0; $items = $generate->current(); + if ($callbackData) { + $items = $callbackData($items); + } foreach ($items as $name => $value) { $columnRow = $this->getColumnIndex($column) . $row; $annotation = '';