PHPExcel完全可以满足你的要求,给个简单处理例子,具体的你还是看看PHPExcel的文档:
代码如下 | 复制代码 |
$filename = "myexcel.xlsx"; $objReader = PHPExcel_IOFactory::createReader('Excel2007'); $objPHPExcel = $objReader->load($filename); $objWriter = PHPExcel_IOFactory::createWriter($objPHPExcel, 'CSV'); $objWriter->save(str_replace('.xlsx', '.csv',$filename)); |