PHP > Excel > xslx exportálása tömbbe

[code]

XSLX iterator

<?php

require_once('library/PHPExcel.php');
require_once('library/PHPExcel/Reader/Excel2007.php');

ini_set('memory_limit','512M');
set_time_limit(60*5);

$excelfile = "Clients.xlsx";
$excelfile_serialized = $excelfile . "serialized";

/**

@Bug

Az $style = $this->_parent->getCellXfByIndex(11); esetén
a $style érteke null.

PHPExcel függőség:
http://phpexcel.codeplex.com/releases/view/10719#DownloadId=100806

*/

if (!file_exists($excelfile_serialized)){

$excel = new PHPExcel_Reader_Excel2007;
$excel->setReadDataOnly(true);
//$excel->setLoadSheetsOnly( array("Munka1", "Munka1") );
$loaded_excel = $excel->load( $excelfile );
$data = $loaded_excel->getActiveSheet()->toArray();
$hnd = fopen( $excelfile_serialized,"w" );
fwrite( $hnd, serialize( $data ) );
fclose( $hnd );

} else {

$data = unserialize(file_get_contents( $excelfile_serialized ));
echo "< pre >";
print_r($data);
echo "< /pre >";

}
[/code]