From 69b4a8cafe2dab29326abf300be950122ab4a3fb Mon Sep 17 00:00:00 2001 From: mkm <727897186@qq.com> Date: Wed, 9 Oct 2024 15:29:22 +0800 Subject: [PATCH] =?UTF-8?q?=E8=B0=83=E6=95=B4XLSX=E5=89=8D=E7=BD=AE?= =?UTF-8?q?=E6=9C=8D=E5=8A=A1=E7=9A=84=E6=96=87=E6=9C=AC=E5=A4=84=E7=90=86?= =?UTF-8?q?=E9=80=BB=E8=BE=91?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - 移除了对'subtitle'字段的截断,现在将完整显示 - 在所有店铺信息后添加了分页符,优化了多页文档的布局 --- app/common/service/xlsx/Beforehand.php | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/app/common/service/xlsx/Beforehand.php b/app/common/service/xlsx/Beforehand.php index 28f3f2b88..0c6958c21 100644 --- a/app/common/service/xlsx/Beforehand.php +++ b/app/common/service/xlsx/Beforehand.php @@ -30,9 +30,11 @@ class Beforehand $textRun =$section->addTextRun(); $textRun->addText($v['system_store'], $fontStyle); - $textRun->addText(' '.mb_substr($v['subtitle'], 0, 8, 'UTF-8'), $fontStyle1); + $textRun->addText(' '.$v['subtitle'], $fontStyle1); $section->addText(mb_substr( $v['store_name'], 0, 16, 'UTF-8'), $fontStyle2); $section->addText($v['address'], $fontStyle3); + $section->addPageBreak(); + } $objWriter = \PhpOffice\PhpWord\IOFactory::createWriter($phpWord, 'Word2007');