SET BORDER

Nov 21, 2008 at 7:36 AM
DEFAULT THE CELL IS A1
I WANT TO ASK HOW CAN I SET A1 BORDER?
I DON'T NEED TO SET FULL CELL BORDER.I JUST NEED TO SET A1 LEFT SIDE OF BORDER LINE.
HOW CAN I DO?
Developer
Nov 21, 2008 at 11:32 AM
Here is the method:

$excel = new PHPExcel();
$sheet = $excel->getActiveSheet();

$sheet->getStyle('A1')->applyFromArray(array(
    'borders' => array(
        'left' => array(
            'style' => PHPExcel_Style_Border::BORDER_THICK,
            'color' => array(
                'rgb' => 'FF0000',
            ),
        ),
    ),
));

$writer = new PHPExcel_Writer_Excel2007($excel);
$writer->save('test.xlsx');