PHPExcel数字类型文本显示, PHPExcel修改列的宽度

$objPHPExcel = new PHPExcel();
$objPHPExcel->setActiveSheetIndex(0);
$objPHPExcel->getActiveSheet()->setTitle('Simple');

//修改数字类型,文本显示
$objPHPExcel->getActiveSheet()->setCellValueExplicit('D1',123456789033,PHPExcel_Cell_DataType::TYPE_STRING);


//修改打开时的宽度
$objPHPExcel->getActiveSheet()->getColumnDimension('A')->setWidth(30);
$objPHPExcel->getActiveSheet()->getColumnDimension('B')->setWidth(30);

posted @ 2020-08-13 20:16  奥雷连诺  阅读(376)  评论(0编辑  收藏  举报