Skip to content

Commit

Permalink
Merge pull request #53 from wblbird/patch-1
Browse files Browse the repository at this point in the history
稍稍增强用户体验
  • Loading branch information
jianyan74 authored Dec 30, 2019
2 parents 1be5cbf + 5b58201 commit 9d703f8
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion common/helpers/ExcelHelper.php
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,8 @@ public static function exportData($list = [], $header = [], $filename = '', $suf
$hk = 1;
foreach ($header as $k => $v) {
$sheet->setCellValue(Coordinate::stringFromColumnIndex($hk) . '1', $v[0]);
$sheet->getStyle(Coordinate::stringFromColumnIndex($hk) . '1')->getFont()->setBold(true);
$sheet->getColumnDimension(Coordinate::stringFromColumnIndex($hk))->setAutoSize(true);
$hk += 1;
}

Expand Down Expand Up @@ -302,4 +304,4 @@ protected static function formattingField($row, $field)

return is_array($row) ? false : $row;
}
}
}

0 comments on commit 9d703f8

Please sign in to comment.