2011-07-08 33 views

回答

0

這是基於PHP的...

先決條件:PHP支持,即。 PHP的服務器,使用XAMPP ...

轉到下面的鏈接下載&: http://phpexcel.codeplex.com/

解壓文件&假設ü把它解壓到/ etc/phpExcel

下面是代碼:

<?php 

error_reporting(E_ALL); 
date_default_timezone_set('Europe/London'); 

/** PHPExcel_IOFactory */ 

require_once '/etc/PHPExcel/Classes/PHPExcel/IOFactory.php'; 

$file=""; //PATH TO CSV FILE` 

// Check prerequisites 

if (!file_exists($file)) { 
    exit("Please run 06largescale.php first.\n"); 
} 

$objReader = PHPExcel_IOFactory::createReader('CSV');` 
$objPHPExcel = $objReader->load($file); 

$objWriter = PHPExcel_IOFactory::createWriter($objPHPExcel, 'Excel2007'); 
$objWriter->save(str_replace('.csv', '.xlsx',$file)); 
?> 
+0

希望,它shud沒有任何內存問題工作... –

+0

我歡迎對有關如有設置PHP的任何幫助。 不能保證ü生根粉大小問題雖然。 –

+0

感謝您的幫助;-)無論如何,我需要在PHP嘗試爲newbie.I要做的設置等... – Nava