I\'m trying to set the width of a cell in an Excel document generated with PHPExcel with:
$objPHPExcel->getActiveSheet()->getColumnDimensionByColumn(\'C\')
It's a subtle difference, but this works fine for me:
$objPHPExcel->getActiveSheet()->getColumnDimension('A')->setWidth(10);
Notice, the difference between getColumnDimensionByColumn and getColumnDimension
getColumnDimensionByColumn
getColumnDimension
Also, I'm not even setting AutoSize and it works fine.