@@ -36,9 +36,9 @@ |
||
36 | 36 | $h1Text = $out[1]; |
37 | 37 | $h2Text = (preg_match($h2Pattern, $fileData, $out)) ? $out[1] : ''; |
38 | 38 | |
39 | - echo '<a href="',$exampleFile,'">',$h1Text,'</a><br />'; |
|
39 | + echo '<a href="', $exampleFile, '">', $h1Text, '</a><br />'; |
|
40 | 40 | if ($h2Text > '') { |
41 | - echo $h2Text,'<br />'; |
|
41 | + echo $h2Text, '<br />'; |
|
42 | 42 | } |
43 | 43 | } |
44 | 44 | } |
@@ -34,7 +34,7 @@ |
||
34 | 34 | // $inputFileType = 'CSV'; |
35 | 35 | $inputFileName = './sampleData/example1.xls'; |
36 | 36 | |
37 | -echo 'Loading file ',pathinfo($inputFileName, PATHINFO_BASENAME),' using IOFactory with a defined reader type of ',$inputFileType,'<br />'; |
|
37 | +echo 'Loading file ', pathinfo($inputFileName, PATHINFO_BASENAME), ' using IOFactory with a defined reader type of ', $inputFileType, '<br />'; |
|
38 | 38 | $objReader = PHPExcel_IOFactory::createReader($inputFileType); |
39 | 39 | $objPHPExcel = $objReader->load($inputFileName); |
40 | 40 |
@@ -50,9 +50,9 @@ |
||
50 | 50 | |
51 | 51 | $filterSubset = new MyReadFilter(); |
52 | 52 | |
53 | -echo 'Loading file ',pathinfo($inputFileName, PATHINFO_BASENAME),' using IOFactory with a defined reader type of ',$inputFileType,'<br />'; |
|
53 | +echo 'Loading file ', pathinfo($inputFileName, PATHINFO_BASENAME), ' using IOFactory with a defined reader type of ', $inputFileType, '<br />'; |
|
54 | 54 | $objReader = PHPExcel_IOFactory::createReader($inputFileType); |
55 | -echo 'Loading Sheet "',$sheetname,'" only<br />'; |
|
55 | +echo 'Loading Sheet "', $sheetname, '" only<br />'; |
|
56 | 56 | $objReader->setLoadSheetsOnly($sheetname); |
57 | 57 | echo 'Loading Sheet using filter<br />'; |
58 | 58 | $objReader->setReadFilter($filterSubset); |
@@ -26,17 +26,17 @@ discard block |
||
26 | 26 | $inputFileName = './sampleData/example1.tsv'; |
27 | 27 | |
28 | 28 | $objReader = PHPExcel_IOFactory::createReader($inputFileType); |
29 | -echo 'Loading file ',pathinfo($inputFileName, PATHINFO_BASENAME),' into WorkSheet #1 using IOFactory with a defined reader type of ',$inputFileType,'<br />'; |
|
29 | +echo 'Loading file ', pathinfo($inputFileName, PATHINFO_BASENAME), ' into WorkSheet #1 using IOFactory with a defined reader type of ', $inputFileType, '<br />'; |
|
30 | 30 | $objReader->setDelimiter("\t"); |
31 | 31 | $objPHPExcel = $objReader->load($inputFileName); |
32 | 32 | $objPHPExcel->getActiveSheet()->setTitle(pathinfo($inputFileName, PATHINFO_BASENAME)); |
33 | 33 | |
34 | 34 | echo '<hr />'; |
35 | 35 | |
36 | -echo $objPHPExcel->getSheetCount(),' worksheet',(($objPHPExcel->getSheetCount() == 1) ? '' : 's'),' loaded<br /><br />'; |
|
36 | +echo $objPHPExcel->getSheetCount(), ' worksheet', (($objPHPExcel->getSheetCount() == 1) ? '' : 's'), ' loaded<br /><br />'; |
|
37 | 37 | $loadedSheetNames = $objPHPExcel->getSheetNames(); |
38 | 38 | foreach ($loadedSheetNames as $sheetIndex => $loadedSheetName) { |
39 | - echo '<b>Worksheet #',$sheetIndex,' -> ',$loadedSheetName,' (Formatted)</b><br />'; |
|
39 | + echo '<b>Worksheet #', $sheetIndex, ' -> ', $loadedSheetName, ' (Formatted)</b><br />'; |
|
40 | 40 | $objPHPExcel->setActiveSheetIndexByName($loadedSheetName); |
41 | 41 | $sheetData = $objPHPExcel->getActiveSheet()->toArray(null, true, true, true); |
42 | 42 | var_dump($sheetData); |
@@ -46,7 +46,7 @@ discard block |
||
46 | 46 | echo '<hr />'; |
47 | 47 | |
48 | 48 | foreach ($loadedSheetNames as $sheetIndex => $loadedSheetName) { |
49 | - echo '<b>Worksheet #',$sheetIndex,' -> ',$loadedSheetName,' (Unformatted)</b><br />'; |
|
49 | + echo '<b>Worksheet #', $sheetIndex, ' -> ', $loadedSheetName, ' (Unformatted)</b><br />'; |
|
50 | 50 | $objPHPExcel->setActiveSheetIndexByName($loadedSheetName); |
51 | 51 | $sheetData = $objPHPExcel->getActiveSheet()->toArray(null, true, false, true); |
52 | 52 | var_dump($sheetData); |
@@ -56,7 +56,7 @@ discard block |
||
56 | 56 | echo '<hr />'; |
57 | 57 | |
58 | 58 | foreach ($loadedSheetNames as $sheetIndex => $loadedSheetName) { |
59 | - echo '<b>Worksheet #',$sheetIndex,' -> ',$loadedSheetName,' (Raw)</b><br />'; |
|
59 | + echo '<b>Worksheet #', $sheetIndex, ' -> ', $loadedSheetName, ' (Raw)</b><br />'; |
|
60 | 60 | $objPHPExcel->setActiveSheetIndexByName($loadedSheetName); |
61 | 61 | $sheetData = $objPHPExcel->getActiveSheet()->toArray(null, false, false, true); |
62 | 62 | var_dump($sheetData); |
@@ -26,7 +26,7 @@ |
||
26 | 26 | include 'PHPExcel/IOFactory.php'; |
27 | 27 | |
28 | 28 | $inputFileName = './sampleData/example1.xls'; |
29 | -echo 'Loading file ',pathinfo($inputFileName, PATHINFO_BASENAME),' using IOFactory to identify the format<br />'; |
|
29 | +echo 'Loading file ', pathinfo($inputFileName, PATHINFO_BASENAME), ' using IOFactory to identify the format<br />'; |
|
30 | 30 | $objPHPExcel = PHPExcel_IOFactory::load($inputFileName); |
31 | 31 | |
32 | 32 | echo '<hr />'; |
@@ -32,7 +32,7 @@ discard block |
||
32 | 32 | // $inputFileType = 'Gnumeric'; |
33 | 33 | $inputFileName = './sampleData/example1.xls'; |
34 | 34 | |
35 | -echo 'Loading file ',pathinfo($inputFileName, PATHINFO_BASENAME),' using IOFactory with a defined reader type of ',$inputFileType,'<br />'; |
|
35 | +echo 'Loading file ', pathinfo($inputFileName, PATHINFO_BASENAME), ' using IOFactory with a defined reader type of ', $inputFileType, '<br />'; |
|
36 | 36 | $objReader = PHPExcel_IOFactory::createReader($inputFileType); |
37 | 37 | echo 'Loading all WorkSheets<br />'; |
38 | 38 | $objReader->setLoadAllSheets(); |
@@ -40,10 +40,10 @@ discard block |
||
40 | 40 | |
41 | 41 | echo '<hr />'; |
42 | 42 | |
43 | -echo $objPHPExcel->getSheetCount(),' worksheet',(($objPHPExcel->getSheetCount() == 1) ? '' : 's'),' loaded<br /><br />'; |
|
43 | +echo $objPHPExcel->getSheetCount(), ' worksheet', (($objPHPExcel->getSheetCount() == 1) ? '' : 's'), ' loaded<br /><br />'; |
|
44 | 44 | $loadedSheetNames = $objPHPExcel->getSheetNames(); |
45 | 45 | foreach ($loadedSheetNames as $sheetIndex => $loadedSheetName) { |
46 | - echo $sheetIndex,' -> ',$loadedSheetName,'<br />'; |
|
46 | + echo $sheetIndex, ' -> ', $loadedSheetName, '<br />'; |
|
47 | 47 | } |
48 | 48 | |
49 | 49 | ?> |
@@ -26,7 +26,7 @@ |
||
26 | 26 | include 'PHPExcel/IOFactory.php'; |
27 | 27 | |
28 | 28 | $inputFileName = './sampleData/example_1.xls'; |
29 | -echo 'Loading file ',pathinfo($inputFileName, PATHINFO_BASENAME),' using IOFactory to identify the format<br />'; |
|
29 | +echo 'Loading file ', pathinfo($inputFileName, PATHINFO_BASENAME), ' using IOFactory to identify the format<br />'; |
|
30 | 30 | try { |
31 | 31 | $objPHPExcel = PHPExcel_IOFactory::load($inputFileName); |
32 | 32 | } catch (\PHPExcel\Reader\Exception $e) { |
@@ -57,7 +57,7 @@ discard block |
||
57 | 57 | } |
58 | 58 | } |
59 | 59 | |
60 | -echo 'Loading file ',pathinfo($inputFileName, PATHINFO_BASENAME),' using IOFactory with a defined reader type of ',$inputFileType,'<br />'; |
|
60 | +echo 'Loading file ', pathinfo($inputFileName, PATHINFO_BASENAME), ' using IOFactory with a defined reader type of ', $inputFileType, '<br />'; |
|
61 | 61 | /* Create a new Reader of the type defined in $inputFileType **/ |
62 | 62 | $objReader = PHPExcel_IOFactory::createReader($inputFileType); |
63 | 63 | |
@@ -68,7 +68,7 @@ discard block |
||
68 | 68 | |
69 | 69 | /* Loop to read our worksheet in "chunk size" blocks **/ |
70 | 70 | for ($startRow = 2; $startRow <= 240; $startRow += $chunkSize) { |
71 | - echo 'Loading WorkSheet using configurable filter for headings row 1 and for rows ',$startRow,' to ',($startRow + $chunkSize - 1),'<br />'; |
|
71 | + echo 'Loading WorkSheet using configurable filter for headings row 1 and for rows ', $startRow, ' to ', ($startRow + $chunkSize - 1), '<br />'; |
|
72 | 72 | /* Create a new Instance of our Read Filter, passing in the limits on which rows we want to read **/ |
73 | 73 | $chunkFilter = new chunkReadFilter($startRow, $chunkSize); |
74 | 74 | /* Tell the Reader that we want to use the new Read Filter that we've just Instantiated **/ |
@@ -27,7 +27,7 @@ |
||
27 | 27 | |
28 | 28 | $inputFileName = './sampleData/example1.xls'; |
29 | 29 | |
30 | -echo 'Loading file ',pathinfo($inputFileName, PATHINFO_BASENAME),' using PHPExcel_Reader_Excel5<br />'; |
|
30 | +echo 'Loading file ', pathinfo($inputFileName, PATHINFO_BASENAME), ' using PHPExcel_Reader_Excel5<br />'; |
|
31 | 31 | $objReader = new PHPExcel_Reader_Excel5(); |
32 | 32 | // $objReader = new PHPExcel_Reader_Excel2007(); |
33 | 33 | // $objReader = new PHPExcel_Reader_Excel2003XML(); |