@@ -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(); |
@@ -60,9 +60,9 @@ |
||
60 | 60 | |
61 | 61 | $filterSubset = new MyReadFilter(9, 15, range('G', 'K')); |
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 | $reader = IOFactory::createReader($inputFileType); |
65 | -echo 'Loading Sheet "',$sheetname,'" only<br />'; |
|
65 | +echo 'Loading Sheet "', $sheetname, '" only<br />'; |
|
66 | 66 | $reader->setLoadSheetsOnly($sheetname); |
67 | 67 | echo 'Loading Sheet using configurable filter<br />'; |
68 | 68 | $reader->setReadFilter($filterSubset); |
@@ -57,7 +57,7 @@ |
||
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 | $reader = IOFactory::createReader($inputFileType); |
63 | 63 |
@@ -25,7 +25,7 @@ |
||
25 | 25 | require_once __DIR__ . '/../../../src/Bootstrap.php'; |
26 | 26 | |
27 | 27 | $inputFileName = './sampleData/example_1.xls'; |
28 | -echo 'Loading file ',pathinfo($inputFileName, PATHINFO_BASENAME),' using IOFactory to identify the format<br />'; |
|
28 | +echo 'Loading file ', pathinfo($inputFileName, PATHINFO_BASENAME), ' using IOFactory to identify the format<br />'; |
|
29 | 29 | try { |
30 | 30 | $spreadsheet = IOFactory::load($inputFileName); |
31 | 31 | } catch (InvalidArgumentException $e) { |
@@ -25,7 +25,7 @@ |
||
25 | 25 | |
26 | 26 | $inputFileName = './sampleData/example1.xls'; |
27 | 27 | |
28 | -echo 'Loading file ',pathinfo($inputFileName, PATHINFO_BASENAME),' using \PhpOffice\PhpSpreadsheet\Reader\Xls<br />'; |
|
28 | +echo 'Loading file ', pathinfo($inputFileName, PATHINFO_BASENAME), ' using \PhpOffice\PhpSpreadsheet\Reader\Xls<br />'; |
|
29 | 29 | $reader = new Xls(); |
30 | 30 | // $reader = new \PhpOffice\PhpSpreadsheet\Reader\Xlsx(); |
31 | 31 | // $reader = new \PhpOffice\PhpSpreadsheet\Reader\Xml(); |