I've seen this post这是有效的。但百分比没有转换。
Ex: 在xls中,C1 = 0,0226115615112098% 转换后,在CSV中,C1 =?0.2f%
在这种情况下,我找不到如何指定好的格式。
帖子的例子是:
require_once 'Classes/PHPExcel/IOFactory.php';
$inputFileType = 'Excel5';
$inputFileName = 'YOUR_EXCEL_FILE_PATH';
$objReader = PHPExcel_IOFactory::createReader($inputFileType);
$objPHPExcelReader = $objReader->load($inputFileName);
$loadedSheetNames = $objPHPExcelReader->getSheetNames();
$objWriter = PHPExcel_IOFactory::createWriter($objPHPExcelReader, 'CSV');
foreach($loadedSheetNames as $sheetIndex => $loadedSheetName) {
$objWriter->setSheetIndex($sheetIndex);
$objWriter->save($loadedSheetName.'.csv');
}