I'm generating Excel files w/ php using the library PHP_Excel, I don't have any issues except with the autosize properties, here's my code that doesn't work :
$wb = new PHPExcel();
$sheet = $wb->getActiveSheet();
PHPExcel_Shared_Font::setAutoSizeMethod(PHPExcel_Shared_Font::AUTOSIZE_METHOD_EXACT);
foreach(range("A", "U") as $col){
$sheet->getColumnDimension($col)->setAutoSize(true);
}
(I rearranged it from the answer of this topic)
Although, I'm getting a php error inside the generated file :
Is there a better way to properly autosize columns ?