修复下载表格缺少样式错误的

This commit is contained in:
小松树 committed 2019-03-15 10:49:26 +08:00
1 parent 37ae7656db
commit 0305278b47
1 file changed
+11 -9
+11 -9
View File
@@ -455,17 +455,19 @@ class JsRongyuInfo extends Base
$worksheet->getCell('H'.$myrowid)->setValue($value->bianhao);
}
// 给单元格加边框
$styleArray = [
'borders' => [
'allBorders' => [
'borderStyle' => \PhpOffice\PhpSpreadsheet\Style\Border::BORDER_THIN,
'color' => ['argb' => '00000000'],
],
],
];
if($key+4>9)
{
// 给单元格加边框
$styleArray = [
'borders' => [
'allBorders' => [
'borderStyle' => \PhpOffice\PhpSpreadsheet\Style\Border::BORDER_THIN,
'color' => ['argb' => '00000000'],
],
],
];
$worksheet->getStyle('A10:I'.($key+4))->applyFromArray($styleArray);
// 设置行高
for($i = 10; $i<=($key+4); $i++){