Skip to content

Commit d3dfe04

Browse files
authored
Update Excel.php
1 parent e925846 commit d3dfe04

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/Utils/Excel.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -200,8 +200,8 @@ public static function datetimeFromCell(mixed $datetime = null, $format = 'Y-m-d
200200
public static function handleRequireCellTextColorForRedAndHyperLink(Event $event)
201201
{
202202
Excel::handleAllCell($event, function ($event, $sheet, $sheetInfo, $cellInfo) {
203-
// 设置列宽 autoSize
204-
$sheet->getColumnDimension($cellInfo['columnLetter'])->setAutoSize(true);
203+
// 设置关闭自动列宽 autoSize
204+
$sheet->getColumnDimension($cellInfo['columnLetter'])->setAutoSize(false);
205205

206206
try {
207207
$calcValue = $sheet->getCell($cellInfo['cell'])->getCalculatedValue();

0 commit comments

Comments
 (0)