Commit 4a6ce053 authored by Liu lu's avatar Liu lu

Vtiful\Kernel\Excel 优化

parent 959f5cbd
......@@ -81,18 +81,17 @@ class KernelExcelExportService
$fileHandle = $this->fileObject->getHandle();
$alignStyle = (new \Vtiful\Kernel\Format($fileHandle))
->align( \Vtiful\Kernel\Format::FORMAT_ALIGN_VERTICAL_CENTER);
->align( \Vtiful\Kernel\Format::FORMAT_ALIGN_CENTER)
->align( \Vtiful\Kernel\Format::FORMAT_ALIGN_VERTICAL_CENTER)
->wrap()->toResource();
if(is_null($definedWith)){
$this->fileObject->setColumn(
'A:'.Coordinate::stringFromColumnIndex(count($this->headers)), $autoWidth,
$alignStyle->align( \Vtiful\Kernel\Format::FORMAT_ALIGN_JUSTIFY)->toResource()
'A:'.Coordinate::stringFromColumnIndex(count($this->headers)), $autoWidth,$alignStyle
);
}else{
$style = $alignStyle->align( \Vtiful\Kernel\Format::FORMAT_ALIGN_CENTER)->toResource();
foreach ($definedWith as $columnTag=>$width){
$this->fileObject->setColumn(
$columnTag.':'.$columnTag, $width, $style
$columnTag.':'.$columnTag, $width, $alignStyle
);
}
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment