Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
当我使用以下代码时,我正在使用以下代码在 Excel 工作表中显示百分比,它从工作表中隐藏“ % ”百分号它显示 29 而不是 29% 我想制作这个数字,但想用“%”符号显示它
$objPHPExcel->getActiveSheet() ->setCellValueExplicit('A1', '29%', PHPExcel_Cell_DataType::TYPE_NUMERIC);
$objPHPExcel->getActiveSheet()->setCellValue('A1', 29); $objPHPExcel->getActiveSheet()->getStyle('A1') ->getNumberFormat()->setFormatCode( '0 "%"' );