@@ -60,7 +60,7 @@ discard block |
||
60 | 60 | } |
61 | 61 | } |
62 | 62 | |
63 | -echo 'Loading file ',pathinfo($inputFileName, PATHINFO_BASENAME),' using IOFactory with a defined reader type of ',$inputFileType,'<br />'; |
|
63 | +echo 'Loading file ', pathinfo($inputFileName, PATHINFO_BASENAME), ' using IOFactory with a defined reader type of ', $inputFileType, '<br />'; |
|
64 | 64 | /* Create a new Reader of the type defined in $inputFileType **/ |
65 | 65 | $reader = IOFactory::createReader($inputFileType); |
66 | 66 | |
@@ -71,7 +71,7 @@ discard block |
||
71 | 71 | |
72 | 72 | /* Loop to read our worksheet in "chunk size" blocks **/ |
73 | 73 | for ($startRow = 2; $startRow <= 240; $startRow += $chunkSize) { |
74 | - echo 'Loading WorkSheet using configurable filter for headings row 1 and for rows ',$startRow,' to ',($startRow + $chunkSize - 1),'<br />'; |
|
74 | + echo 'Loading WorkSheet using configurable filter for headings row 1 and for rows ', $startRow, ' to ', ($startRow + $chunkSize - 1), '<br />'; |
|
75 | 75 | /* Create a new Instance of our Read Filter, passing in the limits on which rows we want to read **/ |
76 | 76 | $chunkFilter = new chunkReadFilter($startRow, $chunkSize); |
77 | 77 | /* Tell the Reader that we want to use the new Read Filter that we've just Instantiated **/ |
@@ -29,17 +29,17 @@ |
||
29 | 29 | $inputFileName = './sampleData/example1.tsv'; |
30 | 30 | |
31 | 31 | $reader = IOFactory::createReader($inputFileType); |
32 | -echo 'Loading file ',pathinfo($inputFileName, PATHINFO_BASENAME),' into WorkSheet #1 using IOFactory with a defined reader type of ',$inputFileType,'<br />'; |
|
32 | +echo 'Loading file ', pathinfo($inputFileName, PATHINFO_BASENAME), ' into WorkSheet #1 using IOFactory with a defined reader type of ', $inputFileType, '<br />'; |
|
33 | 33 | $reader->setDelimiter("\t"); |
34 | 34 | $spreadsheet = $reader->load($inputFileName); |
35 | 35 | $spreadsheet->getActiveSheet()->setTitle(pathinfo($inputFileName, PATHINFO_BASENAME)); |
36 | 36 | |
37 | 37 | echo '<hr />'; |
38 | 38 | |
39 | -echo $spreadsheet->getSheetCount(),' worksheet',(($spreadsheet->getSheetCount() == 1) ? '' : 's'),' loaded<br /><br />'; |
|
39 | +echo $spreadsheet->getSheetCount(), ' worksheet', (($spreadsheet->getSheetCount() == 1) ? '' : 's'), ' loaded<br /><br />'; |
|
40 | 40 | $loadedSheetNames = $spreadsheet->getSheetNames(); |
41 | 41 | foreach ($loadedSheetNames as $sheetIndex => $loadedSheetName) { |
42 | - echo '<b>Worksheet #',$sheetIndex,' -> ',$loadedSheetName,' (Formatted)</b><br />'; |
|
42 | + echo '<b>Worksheet #', $sheetIndex, ' -> ', $loadedSheetName, ' (Formatted)</b><br />'; |
|
43 | 43 | $spreadsheet->setActiveSheetIndexByName($loadedSheetName); |
44 | 44 | $sheetData = $spreadsheet->getActiveSheet()->toArray(null, true, true, true); |
45 | 45 | var_dump($sheetData); |
@@ -30,16 +30,16 @@ |
||
30 | 30 | // $inputFileType = 'Gnumeric'; |
31 | 31 | $inputFileName = './sampleData/example1.xls'; |
32 | 32 | |
33 | -echo 'Loading file ',pathinfo($inputFileName, PATHINFO_BASENAME),' using IOFactory with a defined reader type of ',$inputFileType,'<br />'; |
|
33 | +echo 'Loading file ', pathinfo($inputFileName, PATHINFO_BASENAME), ' using IOFactory with a defined reader type of ', $inputFileType, '<br />'; |
|
34 | 34 | $reader = IOFactory::createReader($inputFileType); |
35 | 35 | |
36 | 36 | /* Read the list of Worksheet Names from the Workbook file **/ |
37 | 37 | echo 'Read the list of Worksheets in the WorkBook<br />'; |
38 | 38 | $worksheetNames = $reader->listWorksheetNames($inputFileName); |
39 | 39 | |
40 | -echo 'There are ',count($worksheetNames),' worksheet',((count($worksheetNames) == 1) ? '' : 's'),' in the workbook<br /><br />'; |
|
40 | +echo 'There are ', count($worksheetNames), ' worksheet', ((count($worksheetNames) == 1) ? '' : 's'), ' in the workbook<br /><br />'; |
|
41 | 41 | foreach ($worksheetNames as $worksheetName) { |
42 | - echo $worksheetName,'<br />'; |
|
42 | + echo $worksheetName, '<br />'; |
|
43 | 43 | } |
44 | 44 | |
45 | 45 | ?> |
@@ -30,7 +30,7 @@ |
||
30 | 30 | // $inputFileType = 'Gnumeric'; |
31 | 31 | $inputFileName = './sampleData/example1.xls'; |
32 | 32 | |
33 | -echo 'Loading file ',pathinfo($inputFileName, PATHINFO_BASENAME),' information using IOFactory with a defined reader type of ',$inputFileType,'<br />'; |
|
33 | +echo 'Loading file ', pathinfo($inputFileName, PATHINFO_BASENAME), ' information using IOFactory with a defined reader type of ', $inputFileType, '<br />'; |
|
34 | 34 | |
35 | 35 | $reader = IOFactory::createReader($inputFileType); |
36 | 36 | $worksheetData = $reader->listWorksheetInfo($inputFileName); |
@@ -24,7 +24,7 @@ |
||
24 | 24 | require_once __DIR__ . '/../../../src/Bootstrap.php'; |
25 | 25 | |
26 | 26 | $inputFileName = './sampleData/example1.xls'; |
27 | -echo 'Loading file ',pathinfo($inputFileName, PATHINFO_BASENAME),' using IOFactory to identify the format<br />'; |
|
27 | +echo 'Loading file ', pathinfo($inputFileName, PATHINFO_BASENAME), ' using IOFactory to identify the format<br />'; |
|
28 | 28 | $spreadsheet = IOFactory::load($inputFileName); |
29 | 29 | |
30 | 30 | echo '<hr />'; |
@@ -31,18 +31,18 @@ |
||
31 | 31 | $inputFileName = './sampleData/example1.xls'; |
32 | 32 | $sheetnames = ['Data Sheet #1', 'Data Sheet #3']; |
33 | 33 | |
34 | -echo 'Loading file ',pathinfo($inputFileName, PATHINFO_BASENAME),' using IOFactory with a defined reader type of ',$inputFileType,'<br />'; |
|
34 | +echo 'Loading file ', pathinfo($inputFileName, PATHINFO_BASENAME), ' using IOFactory with a defined reader type of ', $inputFileType, '<br />'; |
|
35 | 35 | $reader = IOFactory::createReader($inputFileType); |
36 | -echo 'Loading Sheet',((count($sheetnames) == 1) ? '' : 's'),' "',implode('" and "', $sheetnames),'" only<br />'; |
|
36 | +echo 'Loading Sheet', ((count($sheetnames) == 1) ? '' : 's'), ' "', implode('" and "', $sheetnames), '" only<br />'; |
|
37 | 37 | $reader->setLoadSheetsOnly($sheetnames); |
38 | 38 | $spreadsheet = $reader->load($inputFileName); |
39 | 39 | |
40 | 40 | echo '<hr />'; |
41 | 41 | |
42 | -echo $spreadsheet->getSheetCount(),' worksheet',(($spreadsheet->getSheetCount() == 1) ? '' : 's'),' loaded<br /><br />'; |
|
42 | +echo $spreadsheet->getSheetCount(), ' worksheet', (($spreadsheet->getSheetCount() == 1) ? '' : 's'), ' loaded<br /><br />'; |
|
43 | 43 | $loadedSheetNames = $spreadsheet->getSheetNames(); |
44 | 44 | foreach ($loadedSheetNames as $sheetIndex => $loadedSheetName) { |
45 | - echo $sheetIndex,' -> ',$loadedSheetName,'<br />'; |
|
45 | + echo $sheetIndex, ' -> ', $loadedSheetName, '<br />'; |
|
46 | 46 | } |
47 | 47 | |
48 | 48 | ?> |
@@ -30,7 +30,7 @@ |
||
30 | 30 | // $inputFileType = 'Gnumeric'; |
31 | 31 | $inputFileName = './sampleData/example1.xls'; |
32 | 32 | |
33 | -echo 'Loading file ',pathinfo($inputFileName, PATHINFO_BASENAME),' information using IOFactory with a defined reader type of ',$inputFileType,'<br />'; |
|
33 | +echo 'Loading file ', pathinfo($inputFileName, PATHINFO_BASENAME), ' information using IOFactory with a defined reader type of ', $inputFileType, '<br />'; |
|
34 | 34 | |
35 | 35 | $reader = IOFactory::createReader($inputFileType); |
36 | 36 | $worksheetNames = $reader->listWorksheetNames($inputFileName); |
@@ -30,7 +30,7 @@ |
||
30 | 30 | // $inputFileType = 'Gnumeric'; |
31 | 31 | $inputFileName = './sampleData/example1.xls'; |
32 | 32 | |
33 | -echo 'Loading file ',pathinfo($inputFileName, PATHINFO_BASENAME),' using IOFactory with a defined reader type of ',$inputFileType,'<br />'; |
|
33 | +echo 'Loading file ', pathinfo($inputFileName, PATHINFO_BASENAME), ' using IOFactory with a defined reader type of ', $inputFileType, '<br />'; |
|
34 | 34 | $reader = IOFactory::createReader($inputFileType); |
35 | 35 | echo 'Turning Formatting off for Load<br />'; |
36 | 36 | $reader->setReadDataOnly(true); |
@@ -30,7 +30,7 @@ |
||
30 | 30 | // $inputFileType = 'Gnumeric'; |
31 | 31 | $inputFileName = './sampleData/example1.xls'; |
32 | 32 | |
33 | -echo 'Loading file ',pathinfo($inputFileName, PATHINFO_BASENAME),' using IOFactory with a defined reader type of ',$inputFileType,'<br />'; |
|
33 | +echo 'Loading file ', pathinfo($inputFileName, PATHINFO_BASENAME), ' using IOFactory with a defined reader type of ', $inputFileType, '<br />'; |
|
34 | 34 | $reader = IOFactory::createReader($inputFileType); |
35 | 35 | echo 'Loading all WorkSheets<br />'; |
36 | 36 | $reader->setLoadAllSheets(); |