@@ -30,17 +30,17 @@ |
||
30 | 30 | $worksheet = $spreadsheet->getActiveSheet(); |
31 | 31 | |
32 | 32 | // Add some data |
33 | -$database = [['Tree', 'Height', 'Age', 'Yield', 'Profit'], |
|
34 | - ['Apple', 18, 20, 14, 105.00], |
|
35 | - ['Pear', 12, 12, 10, 96.00], |
|
36 | - ['Cherry', 13, 14, 9, 105.00], |
|
37 | - ['Apple', 14, 15, 10, 75.00], |
|
38 | - ['Pear', 9, 8, 8, 76.80], |
|
39 | - ['Apple', 8, 9, 6, 45.00], |
|
33 | +$database = [['Tree', 'Height', 'Age', 'Yield', 'Profit'], |
|
34 | + ['Apple', 18, 20, 14, 105.00], |
|
35 | + ['Pear', 12, 12, 10, 96.00], |
|
36 | + ['Cherry', 13, 14, 9, 105.00], |
|
37 | + ['Apple', 14, 15, 10, 75.00], |
|
38 | + ['Pear', 9, 8, 8, 76.80], |
|
39 | + ['Apple', 8, 9, 6, 45.00], |
|
40 | 40 | ]; |
41 | -$criteria = [['Tree', 'Height', 'Age', 'Yield', 'Profit', 'Height'], |
|
42 | - ['="=Apple"', '>10', null, null, null, '<16'], |
|
43 | - ['="=Pear"', null, null, null, null, null], |
|
41 | +$criteria = [['Tree', 'Height', 'Age', 'Yield', 'Profit', 'Height'], |
|
42 | + ['="=Apple"', '>10', null, null, null, '<16'], |
|
43 | + ['="=Pear"', null, null, null, null, null], |
|
44 | 44 | ]; |
45 | 45 | |
46 | 46 | $worksheet->fromArray($criteria, null, 'A1'); |
@@ -30,17 +30,17 @@ |
||
30 | 30 | $worksheet = $spreadsheet->getActiveSheet(); |
31 | 31 | |
32 | 32 | // Add some data |
33 | -$database = [['Tree', 'Height', 'Age', 'Yield', 'Profit'], |
|
34 | - ['Apple', 18, 20, 14, 105.00], |
|
35 | - ['Pear', 12, 12, 10, 96.00], |
|
36 | - ['Cherry', 13, 14, 9, 105.00], |
|
37 | - ['Apple', 14, 15, 10, 75.00], |
|
38 | - ['Pear', 9, 8, 8, 76.80], |
|
39 | - ['Apple', 8, 9, 6, 45.00], |
|
33 | +$database = [['Tree', 'Height', 'Age', 'Yield', 'Profit'], |
|
34 | + ['Apple', 18, 20, 14, 105.00], |
|
35 | + ['Pear', 12, 12, 10, 96.00], |
|
36 | + ['Cherry', 13, 14, 9, 105.00], |
|
37 | + ['Apple', 14, 15, 10, 75.00], |
|
38 | + ['Pear', 9, 8, 8, 76.80], |
|
39 | + ['Apple', 8, 9, 6, 45.00], |
|
40 | 40 | ]; |
41 | -$criteria = [['Tree', 'Height', 'Age', 'Yield', 'Profit', 'Height'], |
|
42 | - ['="=Apple"', '>10', null, null, null, '<16'], |
|
43 | - ['="=Pear"', null, null, null, null, null], |
|
41 | +$criteria = [['Tree', 'Height', 'Age', 'Yield', 'Profit', 'Height'], |
|
42 | + ['="=Apple"', '>10', null, null, null, '<16'], |
|
43 | + ['="=Pear"', null, null, null, null, null], |
|
44 | 44 | ]; |
45 | 45 | |
46 | 46 | $worksheet->fromArray($criteria, null, 'A1'); |
@@ -30,17 +30,17 @@ |
||
30 | 30 | $worksheet = $spreadsheet->getActiveSheet(); |
31 | 31 | |
32 | 32 | // Add some data |
33 | -$database = [['Tree', 'Height', 'Age', 'Yield', 'Profit'], |
|
34 | - ['Apple', 18, 20, 14, 105.00], |
|
35 | - ['Pear', 12, 12, 10, 96.00], |
|
36 | - ['Cherry', 13, 14, 9, 105.00], |
|
37 | - ['Apple', 14, 15, 10, 75.00], |
|
38 | - ['Pear', 9, 8, 8, 76.80], |
|
39 | - ['Apple', 8, 9, 6, 45.00], |
|
33 | +$database = [['Tree', 'Height', 'Age', 'Yield', 'Profit'], |
|
34 | + ['Apple', 18, 20, 14, 105.00], |
|
35 | + ['Pear', 12, 12, 10, 96.00], |
|
36 | + ['Cherry', 13, 14, 9, 105.00], |
|
37 | + ['Apple', 14, 15, 10, 75.00], |
|
38 | + ['Pear', 9, 8, 8, 76.80], |
|
39 | + ['Apple', 8, 9, 6, 45.00], |
|
40 | 40 | ]; |
41 | -$criteria = [['Tree', 'Height', 'Age', 'Yield', 'Profit', 'Height'], |
|
42 | - ['="=Apple"', '>10', null, null, null, '<16'], |
|
43 | - ['="=Pear"', null, null, null, null, null], |
|
41 | +$criteria = [['Tree', 'Height', 'Age', 'Yield', 'Profit', 'Height'], |
|
42 | + ['="=Apple"', '>10', null, null, null, '<16'], |
|
43 | + ['="=Pear"', null, null, null, null, null], |
|
44 | 44 | ]; |
45 | 45 | |
46 | 46 | $worksheet->fromArray($criteria, null, 'A1'); |
@@ -30,17 +30,17 @@ |
||
30 | 30 | $worksheet = $spreadsheet->getActiveSheet(); |
31 | 31 | |
32 | 32 | // Add some data |
33 | -$database = [['Tree', 'Height', 'Age', 'Yield', 'Profit'], |
|
34 | - ['Apple', 18, 20, 14, 105.00], |
|
35 | - ['Pear', 12, 12, 10, 96.00], |
|
36 | - ['Cherry', 13, 14, 9, 105.00], |
|
37 | - ['Apple', 14, 15, 10, 75.00], |
|
38 | - ['Pear', 9, 8, 8, 76.80], |
|
39 | - ['Apple', 8, 9, 6, 45.00], |
|
33 | +$database = [['Tree', 'Height', 'Age', 'Yield', 'Profit'], |
|
34 | + ['Apple', 18, 20, 14, 105.00], |
|
35 | + ['Pear', 12, 12, 10, 96.00], |
|
36 | + ['Cherry', 13, 14, 9, 105.00], |
|
37 | + ['Apple', 14, 15, 10, 75.00], |
|
38 | + ['Pear', 9, 8, 8, 76.80], |
|
39 | + ['Apple', 8, 9, 6, 45.00], |
|
40 | 40 | ]; |
41 | -$criteria = [['Tree', 'Height', 'Age', 'Yield', 'Profit', 'Height'], |
|
42 | - ['="=Apple"', '>10', null, null, null, '<16'], |
|
43 | - ['="=Pear"', null, null, null, null, null], |
|
41 | +$criteria = [['Tree', 'Height', 'Age', 'Yield', 'Profit', 'Height'], |
|
42 | + ['="=Apple"', '>10', null, null, null, '<16'], |
|
43 | + ['="=Pear"', null, null, null, null, null], |
|
44 | 44 | ]; |
45 | 45 | |
46 | 46 | $worksheet->fromArray($criteria, null, 'A1'); |
@@ -62,7 +62,7 @@ |
||
62 | 62 | } |
63 | 63 | } |
64 | 64 | |
65 | -echo 'Loading file ',pathinfo($inputFileName, PATHINFO_BASENAME),' using IOFactory with a defined reader type of ',$inputFileType,'<br />'; |
|
65 | +echo 'Loading file ', pathinfo($inputFileName, PATHINFO_BASENAME), ' using IOFactory with a defined reader type of ', $inputFileType, '<br />'; |
|
66 | 66 | /* Create a new Reader of the type defined in $inputFileType **/ |
67 | 67 | $reader = \PhpOffice\PhpSpreadsheet\IOFactory::createReader($inputFileType); |
68 | 68 |
@@ -34,13 +34,13 @@ |
||
34 | 34 | echo 'Reading the number of Worksheets in the WorkBook<br />'; |
35 | 35 | /* Use the PhpSpreadsheet object's getSheetCount() method to get a count of the number of WorkSheets in the WorkBook */ |
36 | 36 | $sheetCount = $spreadsheet->getSheetCount(); |
37 | -echo 'There ',(($sheetCount == 1) ? 'is' : 'are'),' ',$sheetCount,' WorkSheet',(($sheetCount == 1) ? '' : 's'),' in the WorkBook<br /><br />'; |
|
37 | +echo 'There ', (($sheetCount == 1) ? 'is' : 'are'), ' ', $sheetCount, ' WorkSheet', (($sheetCount == 1) ? '' : 's'), ' in the WorkBook<br /><br />'; |
|
38 | 38 | |
39 | 39 | echo 'Reading the names of Worksheets in the WorkBook<br />'; |
40 | 40 | /* Use the PhpSpreadsheet object's getSheetNames() method to get an array listing the names/titles of the WorkSheets in the WorkBook */ |
41 | 41 | $sheetNames = $spreadsheet->getSheetNames(); |
42 | 42 | foreach ($sheetNames as $sheetIndex => $sheetName) { |
43 | - echo 'WorkSheet #',$sheetIndex,' is named "',$sheetName,'"<br />'; |
|
43 | + echo 'WorkSheet #', $sheetIndex, ' is named "', $sheetName, '"<br />'; |
|
44 | 44 | } |
45 | 45 | |
46 | 46 | ?> |
@@ -22,7 +22,7 @@ |
||
22 | 22 | require_once __DIR__ . '/../../../src/Bootstrap.php'; |
23 | 23 | |
24 | 24 | $inputFileName = './sampleData/example_1.xls'; |
25 | -echo 'Loading file ',pathinfo($inputFileName, PATHINFO_BASENAME),' using IOFactory to identify the format<br />'; |
|
25 | +echo 'Loading file ', pathinfo($inputFileName, PATHINFO_BASENAME), ' using IOFactory to identify the format<br />'; |
|
26 | 26 | try { |
27 | 27 | $spreadsheet = \PhpOffice\PhpSpreadsheet\IOFactory::load($inputFileName); |
28 | 28 | } catch (\InvalidArgumentException $e) { |
@@ -22,7 +22,7 @@ |
||
22 | 22 | require_once __DIR__ . '/../../../src/Bootstrap.php'; |
23 | 23 | |
24 | 24 | $inputFileName = './sampleData/example1.xls'; |
25 | -echo 'Loading file ',pathinfo($inputFileName, PATHINFO_BASENAME),' using IOFactory to identify the format<br />'; |
|
25 | +echo 'Loading file ', pathinfo($inputFileName, PATHINFO_BASENAME), ' using IOFactory to identify the format<br />'; |
|
26 | 26 | $spreadsheet = \PhpOffice\PhpSpreadsheet\IOFactory::load($inputFileName); |
27 | 27 | |
28 | 28 | echo '<hr />'; |