@@ -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(); |
@@ -1358,15 +1358,15 @@ discard block |
||
1358 | 1358 | Settings::getLibXmlLoaderOptions() |
1359 | 1359 | ); |
1360 | 1360 | |
1361 | - if($vmlCommentsFile !== FALSE) { |
|
1361 | + if ($vmlCommentsFile !== FALSE) { |
|
1362 | 1362 | $vmlCommentsFile->registerXPathNamespace('v', 'urn:schemas-microsoft-com:vml'); |
1363 | 1363 | $shapes = $vmlCommentsFile->xpath('//v:shape'); |
1364 | 1364 | foreach ($shapes as $shape) { |
1365 | 1365 | $shape->registerXPathNamespace('v', 'urn:schemas-microsoft-com:vml'); |
1366 | 1366 | |
1367 | 1367 | if (isset($shape['style'])) { |
1368 | - $style = (string)$shape['style']; |
|
1369 | - $fillColor = strtoupper(substr((string)$shape['fillcolor'], 1)); |
|
1368 | + $style = (string) $shape['style']; |
|
1369 | + $fillColor = strtoupper(substr((string) $shape['fillcolor'], 1)); |
|
1370 | 1370 | $column = null; |
1371 | 1371 | $row = null; |
1372 | 1372 | |
@@ -1374,7 +1374,7 @@ discard block |
||
1374 | 1374 | if (is_array($clientData) && !empty($clientData)) { |
1375 | 1375 | $clientData = $clientData[0]; |
1376 | 1376 | |
1377 | - if (isset($clientData['ObjectType']) && (string)$clientData['ObjectType'] == 'Note') { |
|
1377 | + if (isset($clientData['ObjectType']) && (string) $clientData['ObjectType'] == 'Note') { |
|
1378 | 1378 | $temp = $clientData->xpath('.//x:Row'); |
1379 | 1379 | if (is_array($temp)) { |
1380 | 1380 | $row = $temp[0]; |
@@ -1389,7 +1389,7 @@ discard block |
||
1389 | 1389 | |
1390 | 1390 | if (($column !== null) && ($row !== null)) { |
1391 | 1391 | // Set comment properties |
1392 | - $comment = $docSheet->getCommentByColumnAndRow((string)$column, $row + 1); |
|
1392 | + $comment = $docSheet->getCommentByColumnAndRow((string) $column, $row + 1); |
|
1393 | 1393 | $comment->getFillColor()->setRGB($fillColor); |
1394 | 1394 | |
1395 | 1395 | // Parse style |
@@ -1417,7 +1417,7 @@ discard block |
||
1417 | 1417 | } |
1418 | 1418 | } |
1419 | 1419 | } else { |
1420 | - error_log('Invalid VML Comment XML File '.$fileWorksheet.'/'.$relPath); |
|
1420 | + error_log('Invalid VML Comment XML File ' . $fileWorksheet . '/' . $relPath); |
|
1421 | 1421 | } |
1422 | 1422 | } |
1423 | 1423 |