1 2 3 |
$objPHPExcel->getActiveSheet()->getColumnDimension('B')->setAutoSize(true); $objPHPExcel->getActiveSheet()->getColumnDimension('D')->setWidth(12); |
Example:
1 2 3 4 5 |
//Can't use column index $column_codes = array('A', 'B', 'C', 'D', 'E', 'F', 'G', 'H'); foreach($column_codes as $value){ $worksheet->getColumnDimension($value)->setAutoSize(true); } |
I all the time emailed this blog post page to all my contacts, for the reason that if like to read
it afterward my friends will too.