setAutosize doesn't work

Sep 15, 2009 at 6:07 AM

Hi,

setAutosize works on pdf but not in excel. I am using 1.70.  Can you please check it. thanks

code:

 

$this->excel->workbook->getActiveSheet()->getColumnDimension('A')->setAutoSize(true);
$this->excel->workbook->getActiveSheet()->getColumnDimension('B')->setAutoSize(true);
$this->excel->workbook->getActiveSheet()->getColumnDimension('C')->setAutoSize(true);
$this->excel->workbook->getActiveSheet()->getColumnDimension('D')->setAutoSize(true);
$this->excel->workbook->getActiveSheet()->getColumnDimension('E')->setAutoSize(true);
$this->excel->workbook->getActiveSheet()->getColumnDimension('F')->setAutoSize(true);
$this->excel->workbook->getActiveSheet()->getColumnDimension('G')->setAutoSize(true);
$this->excel->workbook->getActiveSheet()->getColumnDimension('H')->setAutoSize(true);
$this->excel->workbook->getActiveSheet()->getColumnDimension('I')->setAutoSize(true);


$this->excel->workbook->getActiveSheet()->SetCellValue('A3', 'CUST AC NO');
$this->excel->workbook->getActiveSheet()->SetCellValue('B3', 'MOBTEL');
$this->excel->workbook->getActiveSheet()->SetCellValue('C3', 'MSF');
//$this->excel->workbook->getActiveSheet()->SetCellValue('D3', 'AUR');
$this->excel->workbook->getActiveSheet()->SetCellValue('D3', 'IDD');
$this->excel->workbook->getActiveSheet()->SetCellValue('E3', 'NDD');
$this->excel->workbook->getActiveSheet()->SetCellValue('F3', 'HP 2 HP');
$this->excel->workbook->getActiveSheet()->SetCellValue('G3', 'HP 2 OTHER');
$this->excel->workbook->getActiveSheet()->SetCellValue('H3', 'BLOOP');
$this->excel->workbook->getActiveSheet()->SetCellValue('I3', 'SMS HP2HP');


here's the output:



 

Developer
Sep 15, 2009 at 3:23 PM

Can you upload the Excel file (xlsx) somewhere so we can test? Or you can send it to me: (erik at phpexcel dot net)