使用PHPExcel
include 'PHPExcel/IOFactory.php';$objReader = PHPExcel_IOFactory::createReader('CSV');// If the files uses a delimiter other than a comma (e.g. a tab), then tell the reader$objReader->setDelimiter("t");// If the files uses an encoding other than UTF-8 or ASCII, then tell the reader$objReader->setInputEncoding('UTF-16LE');$objPHPExcel = $objReader->load('MyCSVFile.csv');$objWriter = PHPExcel_IOFactory::createWriter($objPHPExcel, 'Excel5');$objWriter->save('MyExcelFile.xls');


