邊框
框線程式碼:
$sheet->getStyle('A1:A2')->getBorders()->getOutline()->setBorderStyle(PHPExcel_Style_Border::BORDER_THIN);
可設定的內容:
getLeft()
getRight()
getTop()
getBottom()
getDiagonal()
getAllBorders()
getOutline()
getInside()
getVertical()
getHorizontal()
樣式
程式碼:$sheet->getStyle('A1:A2')->getBorders()->getOutline()->setBorderStyle(PHPExcel_Style_Border::BORDER_THIN);
可設定的內容:
BORDER_NONE
BORDER_THIN
BORDER_MEDIUM
BORDER_DASHED
BORDER_THICK
BORDER_DOUBLE
BORDER_DOTTED
BORDER_DASHDOT
BORDER_MEDIUMDASHDOT
BORDER_DASHDOTDOT
BORDER_MEDIUMDASHDOTDOT
BORDER_MEDIUMDASHDOTDOT
BORDER_SLANTDASHDOT
BORDER_MEDIUMDASHED
-----------------------------------------------------------------------------------
對齊
水平或垂直
程式碼:$sheet->getStyle('A1:A2')->getAlignment()->setVertical(PHPExcel_Style_Alignment::VERTICAL_CENTER);
可設定的內容:
setVertical
setHorizontal
對齊方式
程式碼:$sheet->getStyle('A1:A2')->getAlignment()->setVertical(PHPExcel_Style_Alignment::VERTICAL_CENTER);
可設定的內容:
VERTICAL_TOP
VERTICAL_BOTTOM
VERTICAL_CENTER
VERTICAL_JUSTIFY
HORIZONTAL_GENERAL
HORIZONTAL_LEFT
HORIZONTAL_RIGHT
HORIZONTAL_CENTER
HORIZONTAL_CENTER_CONTINUOUS
HORIZONTAL_JUSTIFY
沒有留言:
張貼留言