I set the column width for a CSV file using
$objPHPExcel->getActiveSheet()->getColumnDimension('A')->setWidth(50);
But I do not see changes in the width of column A, what am I doing wrong?
Assuming you are using CSV Writer.
CSV files do not support any formatting , just data, so the column width (which is formatting) cannot be applied when writing a CSV file
Disable autoizeize first:
$objPHPExcel->getActiveSheet()->getColumnDimension('A')->setAutoSize(false);
Now you can install:
$objPHPExcel->getActiveSheet()->getColumnDimension('A')->setWidth("50");