@@ -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 />'; |
@@ -245,7 +245,7 @@ discard block |
||
245 | 245 | $catIsMultiLevelSeries = $valIsMultiLevelSeries = false; |
246 | 246 | $plotGroupingType = ''; |
247 | 247 | foreach ($chartTypes as $chartType) { |
248 | - $objWriter->startElement('c:'.$chartType); |
|
248 | + $objWriter->startElement('c:' . $chartType); |
|
249 | 249 | |
250 | 250 | $groupCount = $plotArea->getPlotGroupCount(); |
251 | 251 | for ($i = 0; $i < $groupCount; ++$i) { |
@@ -852,7 +852,7 @@ discard block |
||
852 | 852 | |
853 | 853 | if (null !== $xAxis->getFillProperty('value')) { |
854 | 854 | $objWriter->startElement('a:solidFill'); |
855 | - $objWriter->startElement('a:'.$xAxis->getFillProperty('type')); |
|
855 | + $objWriter->startElement('a:' . $xAxis->getFillProperty('type')); |
|
856 | 856 | $objWriter->writeAttribute('val', $xAxis->getFillProperty('value')); |
857 | 857 | $objWriter->startElement('a:alpha'); |
858 | 858 | $objWriter->writeAttribute('val', $xAxis->getFillProperty('alpha')); |
@@ -869,7 +869,7 @@ discard block |
||
869 | 869 | |
870 | 870 | if (null !== $xAxis->getLineProperty('value')) { |
871 | 871 | $objWriter->startElement('a:solidFill'); |
872 | - $objWriter->startElement('a:'.$xAxis->getLineProperty('type')); |
|
872 | + $objWriter->startElement('a:' . $xAxis->getLineProperty('type')); |
|
873 | 873 | $objWriter->writeAttribute('val', $xAxis->getLineProperty('value')); |
874 | 874 | $objWriter->startElement('a:alpha'); |
875 | 875 | $objWriter->writeAttribute('val', $xAxis->getLineProperty('alpha')); |
@@ -1320,13 +1320,13 @@ discard block |
||
1320 | 1320 | |
1321 | 1321 | $objWriter->endElement(); |
1322 | 1322 | } else { |
1323 | - $objWriter->startElement('c:'.$dataType.'Ref'); |
|
1323 | + $objWriter->startElement('c:' . $dataType . 'Ref'); |
|
1324 | 1324 | |
1325 | 1325 | $objWriter->startElement('c:f'); |
1326 | 1326 | $objWriter->writeRawData($plotSeriesValues->getDataSource()); |
1327 | 1327 | $objWriter->endElement(); |
1328 | 1328 | |
1329 | - $objWriter->startElement('c:'.$dataType.'Cache'); |
|
1329 | + $objWriter->startElement('c:' . $dataType . 'Cache'); |
|
1330 | 1330 | |
1331 | 1331 | if (($groupType !== DataSeries::TYPE_PIECHART) && ($groupType !== DataSeries::TYPE_PIECHART_3D) && ($groupType !== DataSeries::TYPE_DONUTCHART)) { |
1332 | 1332 | if (($plotSeriesValues->getFormatCode() !== null) && ($plotSeriesValues->getFormatCode() !== '')) { |