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.
我已经下载了最新版本的 PHPExcel,但我仍然无法将负值存储在 excel 文件中。
负值显示为
<span class="neg">$-4,812.26</span>
该值存储在 $budg 中,我使用format_currency($budg)它以正确的格式保存它。
format_currency($budg)
$objPHPExcel->getActiveSheet() ->setCellValue('A1',$budg); $objPHPExcel->getActiveSheet() ->getStyle('A1') ->getNumberFormat() ->setFormatCode('$#,##0.00');