diff --git a/Documentation/Examples/Reader/exampleReader12.php b/Documentation/Examples/Reader/exampleReader12.php index 7011355b..1df90cd3 100644 --- a/Documentation/Examples/Reader/exampleReader12.php +++ b/Documentation/Examples/Reader/exampleReader12.php @@ -20,13 +20,17 @@ date_default_timezone_set('Europe/London'); $loadedSheetName) { $objPHPExcel->setActiveSheetIndexByName($loadedSheetName); $sheetData = $objPHPExcel->getActiveSheet()->toArray(null,true,true,true); var_dump($sheetData); - echo '
'; + echo '

'; } diff --git a/Documentation/Examples/Reader/exampleReader14.php b/Documentation/Examples/Reader/exampleReader14.php index f8661b84..e787ca92 100644 --- a/Documentation/Examples/Reader/exampleReader14.php +++ b/Documentation/Examples/Reader/exampleReader14.php @@ -1,7 +1,5 @@ diff --git a/Documentation/Examples/Reader/exampleReader15.php b/Documentation/Examples/Reader/exampleReader15.php index c507b8a5..97aa856a 100644 --- a/Documentation/Examples/Reader/exampleReader15.php +++ b/Documentation/Examples/Reader/exampleReader15.php @@ -31,7 +31,7 @@ echo 'Loading file ',pathinfo($inputFileName,PATHINFO_BASENAME),' using IOFactor try { $objPHPExcel = PHPExcel_IOFactory::load($inputFileName); } catch(Exception $e) { - die('Error loading file "',pathinfo($inputFileName,PATHINFO_BASENAME),'": ',$e->getMessage()); + die('Error loading file "'.pathinfo($inputFileName,PATHINFO_BASENAME).'": '.$e->getMessage()); } diff --git a/Documentation/Examples/index.php b/Documentation/Examples/index.php new file mode 100644 index 00000000..d85588cc --- /dev/null +++ b/Documentation/Examples/index.php @@ -0,0 +1,49 @@ + + + + + +PHPExcel Examples + + + + +PHPExcel '.pathinfo($exampleType,PATHINFO_BASENAME).' Examples'; + + $exampleList = glob('./'.$exampleType.'/*.php'); + + foreach($exampleList as $exampleFile) { + $fileData = file_get_contents($exampleFile); + + $h1Pattern = '#

(.*?)

#'; + $h2Pattern = '#

(.*?)

#'; + + if (preg_match($h1Pattern, $fileData, $out)) { + $h1Text = $out[1]; + $h2Text = (preg_match($h2Pattern, $fileData, $out)) ? $out[1] : ''; + + echo '',$h1Text,'
'; + if ($h2Text > '') { + echo $h2Text,'
'; + } + } + + } +} + +?> + + \ No newline at end of file