@@ -34,10 +34,10 @@ |
||
34 | 34 | $h1Text = $out[1]; |
35 | 35 | $h2Text = (preg_match($h2Pattern, $fileData, $out)) ? $out[1] : ''; |
36 | 36 | |
37 | - echo '<a href="',$exampleFile,'">',$h1Text,'</a><br />'; |
|
37 | + echo '<a href="', $exampleFile, '">', $h1Text, '</a><br />'; |
|
38 | 38 | if (($h2Text > '') && |
39 | 39 | (pathinfo($exampleType, PATHINFO_BASENAME) != 'Calculations')) { |
40 | - echo $h2Text,'<br />'; |
|
40 | + echo $h2Text, '<br />'; |
|
41 | 41 | } |
42 | 42 | } |
43 | 43 | } |
@@ -41,7 +41,7 @@ discard block |
||
41 | 41 | echo '<b>Custom Properties: </b><br />'; |
42 | 42 | /* Loop through the list of custom properties **/ |
43 | 43 | foreach ($customPropertyList as $customPropertyName) { |
44 | - echo '<b>',$customPropertyName,': </b>'; |
|
44 | + echo '<b>', $customPropertyName, ': </b>'; |
|
45 | 45 | /* Retrieve the property value **/ |
46 | 46 | $propertyValue = $objPHPExcel->getProperties()->getCustomPropertyValue($customPropertyName); |
47 | 47 | /* Retrieve the property type **/ |
@@ -68,7 +68,7 @@ discard block |
||
68 | 68 | break; |
69 | 69 | } |
70 | 70 | |
71 | - echo $propertyValue,' (',$propertyType,')<br />'; |
|
71 | + echo $propertyValue, ' (', $propertyType, ')<br />'; |
|
72 | 72 | } |
73 | 73 | |
74 | 74 | ?> |
@@ -40,7 +40,7 @@ |
||
40 | 40 | |
41 | 41 | echo '<b>Custom Property names: </b><br />'; |
42 | 42 | foreach ($customPropertyList as $customPropertyName) { |
43 | - echo $customPropertyName,'<br />'; |
|
43 | + echo $customPropertyName, '<br />'; |
|
44 | 44 | } |
45 | 45 | |
46 | 46 | ?> |
@@ -37,53 +37,53 @@ |
||
37 | 37 | |
38 | 38 | /* Read the document's creator property **/ |
39 | 39 | $creator = $objPHPExcel->getProperties()->getCreator(); |
40 | -echo '<b>Document Creator: </b>',$creator,'<br />'; |
|
40 | +echo '<b>Document Creator: </b>', $creator, '<br />'; |
|
41 | 41 | |
42 | 42 | /* Read the Date when the workbook was created (as a PHP timestamp value) **/ |
43 | 43 | $creationDatestamp = $objPHPExcel->getProperties()->getCreated(); |
44 | 44 | /* Format the date and time using the standard PHP date() function **/ |
45 | 45 | $creationDate = date('l, d<\s\up>S</\s\up> F Y', $creationDatestamp); |
46 | 46 | $creationTime = date('g:i A', $creationDatestamp); |
47 | -echo '<b>Created On: </b>',$creationDate,' at ',$creationTime,'<br />'; |
|
47 | +echo '<b>Created On: </b>', $creationDate, ' at ', $creationTime, '<br />'; |
|
48 | 48 | |
49 | 49 | /* Read the name of the last person to modify this workbook **/ |
50 | 50 | $modifiedBy = $objPHPExcel->getProperties()->getLastModifiedBy(); |
51 | -echo '<b>Last Modified By: </b>',$modifiedBy,'<br />'; |
|
51 | +echo '<b>Last Modified By: </b>', $modifiedBy, '<br />'; |
|
52 | 52 | |
53 | 53 | /* Read the Date when the workbook was last modified (as a PHP timestamp value) **/ |
54 | 54 | $modifiedDatestamp = $objPHPExcel->getProperties()->getModified(); |
55 | 55 | /* Format the date and time using the standard PHP date() function **/ |
56 | 56 | $modifiedDate = date('l, d<\s\up>S</\s\up> F Y', $modifiedDatestamp); |
57 | 57 | $modifiedTime = date('g:i A', $modifiedDatestamp); |
58 | -echo '<b>Last Modified On: </b>',$modifiedDate,' at ',$modifiedTime,'<br />'; |
|
58 | +echo '<b>Last Modified On: </b>', $modifiedDate, ' at ', $modifiedTime, '<br />'; |
|
59 | 59 | |
60 | 60 | /* Read the workbook title property **/ |
61 | 61 | $workbookTitle = $objPHPExcel->getProperties()->getTitle(); |
62 | -echo '<b>Title: </b>',$workbookTitle,'<br />'; |
|
62 | +echo '<b>Title: </b>', $workbookTitle, '<br />'; |
|
63 | 63 | |
64 | 64 | /* Read the workbook description property **/ |
65 | 65 | $description = $objPHPExcel->getProperties()->getDescription(); |
66 | -echo '<b>Description: </b>',$description,'<br />'; |
|
66 | +echo '<b>Description: </b>', $description, '<br />'; |
|
67 | 67 | |
68 | 68 | /* Read the workbook subject property **/ |
69 | 69 | $subject = $objPHPExcel->getProperties()->getSubject(); |
70 | -echo '<b>Subject: </b>',$subject,'<br />'; |
|
70 | +echo '<b>Subject: </b>', $subject, '<br />'; |
|
71 | 71 | |
72 | 72 | /* Read the workbook keywords property **/ |
73 | 73 | $keywords = $objPHPExcel->getProperties()->getKeywords(); |
74 | -echo '<b>Keywords: </b>',$keywords,'<br />'; |
|
74 | +echo '<b>Keywords: </b>', $keywords, '<br />'; |
|
75 | 75 | |
76 | 76 | /* Read the workbook category property **/ |
77 | 77 | $category = $objPHPExcel->getProperties()->getCategory(); |
78 | -echo '<b>Category: </b>',$category,'<br />'; |
|
78 | +echo '<b>Category: </b>', $category, '<br />'; |
|
79 | 79 | |
80 | 80 | /* Read the workbook company property **/ |
81 | 81 | $company = $objPHPExcel->getProperties()->getCompany(); |
82 | -echo '<b>Company: </b>',$company,'<br />'; |
|
82 | +echo '<b>Company: </b>', $company, '<br />'; |
|
83 | 83 | |
84 | 84 | /* Read the workbook manager property **/ |
85 | 85 | $manager = $objPHPExcel->getProperties()->getManager(); |
86 | -echo '<b>Manager: </b>',$manager,'<br />'; |
|
86 | +echo '<b>Manager: </b>', $manager, '<br />'; |
|
87 | 87 | |
88 | 88 | ?> |
89 | 89 | <body> |
@@ -38,13 +38,13 @@ |
||
38 | 38 | echo 'Reading the number of Worksheets in the WorkBook<br />'; |
39 | 39 | /* Use the PHPExcel object's getSheetCount() method to get a count of the number of WorkSheets in the WorkBook */ |
40 | 40 | $sheetCount = $objPHPExcel->getSheetCount(); |
41 | -echo 'There ',(($sheetCount == 1) ? 'is' : 'are'),' ',$sheetCount,' WorkSheet',(($sheetCount == 1) ? '' : 's'),' in the WorkBook<br /><br />'; |
|
41 | +echo 'There ', (($sheetCount == 1) ? 'is' : 'are'), ' ', $sheetCount, ' WorkSheet', (($sheetCount == 1) ? '' : 's'), ' in the WorkBook<br /><br />'; |
|
42 | 42 | |
43 | 43 | echo 'Reading the names of Worksheets in the WorkBook<br />'; |
44 | 44 | /* Use the PHPExcel object's getSheetNames() method to get an array listing the names/titles of the WorkSheets in the WorkBook */ |
45 | 45 | $sheetNames = $objPHPExcel->getSheetNames(); |
46 | 46 | foreach ($sheetNames as $sheetIndex => $sheetName) { |
47 | - echo 'WorkSheet #',$sheetIndex,' is named "',$sheetName,'"<br />'; |
|
47 | + echo 'WorkSheet #', $sheetIndex, ' is named "', $sheetName, '"<br />'; |
|
48 | 48 | } |
49 | 49 | |
50 | 50 | ?> |
@@ -28,9 +28,9 @@ |
||
28 | 28 | $inputFileName = './sampleData/example1.xls'; |
29 | 29 | |
30 | 30 | $inputFileType = PHPExcel_IOFactory::identify($inputFileName); |
31 | -echo 'File ',pathinfo($inputFileName, PATHINFO_BASENAME),' has been identified as an ',$inputFileType,' file<br />'; |
|
31 | +echo 'File ', pathinfo($inputFileName, PATHINFO_BASENAME), ' has been identified as an ', $inputFileType, ' file<br />'; |
|
32 | 32 | |
33 | -echo 'Loading file ',pathinfo($inputFileName, PATHINFO_BASENAME),' using IOFactory with the identified reader type<br />'; |
|
33 | +echo 'Loading file ', pathinfo($inputFileName, PATHINFO_BASENAME), ' using IOFactory with the identified reader type<br />'; |
|
34 | 34 | $objReader = PHPExcel_IOFactory::createReader($inputFileType); |
35 | 35 | $objPHPExcel = $objReader->load($inputFileName); |
36 | 36 |
@@ -26,7 +26,7 @@ |
||
26 | 26 | include 'PHPExcel/IOFactory.php'; |
27 | 27 | |
28 | 28 | $inputFileName = './sampleData/example_1.xls'; |
29 | -echo 'Loading file ',pathinfo($inputFileName, PATHINFO_BASENAME),' using IOFactory to identify the format<br />'; |
|
29 | +echo 'Loading file ', pathinfo($inputFileName, PATHINFO_BASENAME), ' using IOFactory to identify the format<br />'; |
|
30 | 30 | try { |
31 | 31 | $objPHPExcel = PHPExcel_IOFactory::load($inputFileName); |
32 | 32 | } catch (\PHPExcel\Reader\Exception $e) { |
@@ -32,7 +32,7 @@ |
||
32 | 32 | // $inputFileType = 'Gnumeric'; |
33 | 33 | $inputFileName = './sampleData/example1.xls'; |
34 | 34 | |
35 | -echo 'Loading file ',pathinfo($inputFileName, PATHINFO_BASENAME),' using IOFactory with a defined reader type of ',$inputFileType,'<br />'; |
|
35 | +echo 'Loading file ', pathinfo($inputFileName, PATHINFO_BASENAME), ' using IOFactory with a defined reader type of ', $inputFileType, '<br />'; |
|
36 | 36 | $objReader = PHPExcel_IOFactory::createReader($inputFileType); |
37 | 37 | echo 'Turning Formatting off for Load<br />'; |
38 | 38 | $objReader->setReadDataOnly(true); |
@@ -62,9 +62,9 @@ |
||
62 | 62 | |
63 | 63 | $filterSubset = new MyReadFilter(9, 15, range('G', 'K')); |
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 | $objReader = PHPExcel_IOFactory::createReader($inputFileType); |
67 | -echo 'Loading Sheet "',$sheetname,'" only<br />'; |
|
67 | +echo 'Loading Sheet "', $sheetname, '" only<br />'; |
|
68 | 68 | $objReader->setLoadSheetsOnly($sheetname); |
69 | 69 | echo 'Loading Sheet using configurable filter<br />'; |
70 | 70 | $objReader->setReadFilter($filterSubset); |