Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to do the phpexcel Outside Border

Tags:

php

phpexcel

I use the below code for All Borders

$BStyle = array(
  'borders' => array(
    'allborders' => array(
      'style' => PHPExcel_Style_Border::BORDER_THIN
    )
  )
);

Here i use

$objPHPExcel->getActiveSheet()->getStyle('A8:L8')->applyFromArray($BStyle);

But How can i give the Outside Border Like the below given screen

enter image description here

like image 348
ABD Avatar asked Jan 04 '15 09:01

ABD


1 Answers

As described in the PHPExcel docs you use outline, so:

$BStyle = array(   'borders' => array(     'outline' => array(       'style' => PHPExcel_Style_Border::BORDER_THIN     )   ) ); 

All the available options are shown in this illustration

This [illus

like image 110
Mark Baker Avatar answered Sep 17 '22 17:09

Mark Baker