I want to export an excel array with optimal format. So I search the highest cell :
$highestRow = $objPHPExcel->getActiveSheet()->getHighestRow();
$highestColumn = $objPHPExcel->getActiveSheet()->getHighestColumn();
$highestcell=($highestColumn.$highestRow);
And now I want to applicate the style to the range of cells (A2:$highestCell)
$objPHPExcel->getActiveSheet()->getStyle('A2:$highestcell')->applyFromArray($styleArray2);
The problem is that getStyle is only for one cell or a range of cells (A1:B1) for example. So how can I resolve my problem to have an optimal format for my Excel sheet.
Any suggestions would be helpful, thanks. Corentin
Edit : I found the solution, just getStyle('A2:'$highestcell)