file fomat error

Oct 9, 2008 at 5:45 AM
I don't know why can't open the excel file?
Excel show a error message about file fomat error...

Below is my program code

/** Error reporting */
/** Include path **/
ini_set('include_path', ini_get('include_path').';../Classes/');
/** PHPExcel */
include 'PHPExcel.php';
include 'PHPExcel/Writer/Excel2007.php';
$excel = new PHPExcel();
$sheet = $excel->getActiveSheet();


$excel->getActiveSheet()->SetCellValue('A1', 'Hello');
$excel->getActiveSheet()->SetCellValue('B2', 'world!');
$excel->getActiveSheet()->SetCellValue('C1', 'Hello');
$excel->getActiveSheet()->SetCellValue('D2', 'world!');

$drawing = new PHPExcel_Worksheet_Drawing();

$writer = new PHPExcel_Writer_Excel2007($excel);

Please Help Me ~
Oct 9, 2008 at 6:05 AM
Hmm... I don't see any errors. Can you upload the file somewhere so we can inspect?

Oct 9, 2008 at 7:43 AM
Try upgrading php_zip, there are versions which produce invalid OpenXML packages, unfortunately...
Oct 9, 2008 at 8:16 AM
Which version of php_zip is suitable for me use?