Completed
Pull Request — develop (#29)
by Elan
22:48
created
Documentation/Examples/Calculations/Database/DAVERAGE.php 2 patches
Spacing   +18 added lines, -18 removed lines patch added patch discarded remove patch
@@ -32,21 +32,21 @@  discard block
 block discarded – undo
32 32
 $worksheet = $objPHPExcel->getActiveSheet();
33 33
 
34 34
 // Add some data
35
-$database = array( array( 'Tree',  'Height', 'Age', 'Yield', 'Profit' ),
36
-                   array( 'Apple',  18,       20,    14,      105.00  ),
37
-                   array( 'Pear',   12,       12,    10,       96.00  ),
38
-                   array( 'Cherry', 13,       14,     9,      105.00  ),
39
-                   array( 'Apple',  14,       15,    10,       75.00  ),
40
-                   array( 'Pear',    9,        8,     8,       76.80  ),
41
-                   array( 'Apple',   8,        9,     6,       45.00  ),
35
+$database = array(array('Tree', 'Height', 'Age', 'Yield', 'Profit'),
36
+                   array('Apple', 18, 20, 14, 105.00),
37
+                   array('Pear', 12, 12, 10, 96.00),
38
+                   array('Cherry', 13, 14, 9, 105.00),
39
+                   array('Apple', 14, 15, 10, 75.00),
40
+                   array('Pear', 9, 8, 8, 76.80),
41
+                   array('Apple', 8, 9, 6, 45.00),
42 42
                  );
43
-$criteria = array( array( 'Tree',      'Height', 'Age', 'Yield', 'Profit', 'Height' ),
44
-                   array( '="=Apple"', '>10',    NULL,  NULL,    NULL,     '<16'    ),
45
-                   array( '="=Pear"',  NULL,     NULL,  NULL,    NULL,     NULL     )
43
+$criteria = array(array('Tree', 'Height', 'Age', 'Yield', 'Profit', 'Height'),
44
+                   array('="=Apple"', '>10', NULL, NULL, NULL, '<16'),
45
+                   array('="=Pear"', NULL, NULL, NULL, NULL, NULL)
46 46
                  );
47 47
 
48
-$worksheet->fromArray( $criteria, NULL, 'A1' );
49
-$worksheet->fromArray( $database, NULL, 'A4' );
48
+$worksheet->fromArray($criteria, NULL, 'A1');
49
+$worksheet->fromArray($database, NULL, 'A4');
50 50
 
51 51
 $worksheet->setCellValue('A12', 'The Average yield of Apple trees over 10\' in height');
52 52
 $worksheet->setCellValue('B12', '=DAVERAGE(A4:E10,"Yield",A1:B2)');
@@ -60,7 +60,7 @@  discard block
 block discarded – undo
60 60
 
61 61
 echo '<h4>Database</h4>';
62 62
 
63
-$databaseData = $worksheet->rangeToArray('A4:E10',null,true,true,true);
63
+$databaseData = $worksheet->rangeToArray('A4:E10', null, true, true, true);
64 64
 var_dump($databaseData);
65 65
 
66 66
 
@@ -70,18 +70,18 @@  discard block
 block discarded – undo
70 70
 // Test the formulae
71 71
 echo '<h4>Criteria</h4>';
72 72
 
73
-$criteriaData = $worksheet->rangeToArray('A1:B2',null,true,true,true);
73
+$criteriaData = $worksheet->rangeToArray('A1:B2', null, true, true, true);
74 74
 var_dump($criteriaData);
75 75
 
76
-echo $worksheet->getCell("A12")->getValue() .'<br />';
77
-echo 'DAVERAGE() Result is ' . $worksheet->getCell("B12")->getCalculatedValue() .'<br /><br />';
76
+echo $worksheet->getCell("A12")->getValue() . '<br />';
77
+echo 'DAVERAGE() Result is ' . $worksheet->getCell("B12")->getCalculatedValue() . '<br /><br />';
78 78
 
79 79
 echo '<h4>Criteria</h4>';
80 80
 
81
-$criteriaData = $worksheet->rangeToArray('A1:A3',null,true,true,true);
81
+$criteriaData = $worksheet->rangeToArray('A1:A3', null, true, true, true);
82 82
 var_dump($criteriaData);
83 83
 
84
-echo $worksheet->getCell("A13")->getValue() .'<br />';
84
+echo $worksheet->getCell("A13")->getValue() . '<br />';
85 85
 echo 'DAVERAGE() Result is ' . $worksheet->getCell("B13")->getCalculatedValue();
86 86
 
87 87
 
Please login to merge, or discard this patch.
Indentation   +10 added lines, -10 removed lines patch added patch discarded remove patch
@@ -33,17 +33,17 @@
 block discarded – undo
33 33
 
34 34
 // Add some data
35 35
 $database = array( array( 'Tree',  'Height', 'Age', 'Yield', 'Profit' ),
36
-                   array( 'Apple',  18,       20,    14,      105.00  ),
37
-                   array( 'Pear',   12,       12,    10,       96.00  ),
38
-                   array( 'Cherry', 13,       14,     9,      105.00  ),
39
-                   array( 'Apple',  14,       15,    10,       75.00  ),
40
-                   array( 'Pear',    9,        8,     8,       76.80  ),
41
-                   array( 'Apple',   8,        9,     6,       45.00  ),
42
-                 );
36
+                    array( 'Apple',  18,       20,    14,      105.00  ),
37
+                    array( 'Pear',   12,       12,    10,       96.00  ),
38
+                    array( 'Cherry', 13,       14,     9,      105.00  ),
39
+                    array( 'Apple',  14,       15,    10,       75.00  ),
40
+                    array( 'Pear',    9,        8,     8,       76.80  ),
41
+                    array( 'Apple',   8,        9,     6,       45.00  ),
42
+                    );
43 43
 $criteria = array( array( 'Tree',      'Height', 'Age', 'Yield', 'Profit', 'Height' ),
44
-                   array( '="=Apple"', '>10',    NULL,  NULL,    NULL,     '<16'    ),
45
-                   array( '="=Pear"',  NULL,     NULL,  NULL,    NULL,     NULL     )
46
-                 );
44
+                    array( '="=Apple"', '>10',    NULL,  NULL,    NULL,     '<16'    ),
45
+                    array( '="=Pear"',  NULL,     NULL,  NULL,    NULL,     NULL     )
46
+                    );
47 47
 
48 48
 $worksheet->fromArray( $criteria, NULL, 'A1' );
49 49
 $worksheet->fromArray( $database, NULL, 'A4' );
Please login to merge, or discard this patch.
Documentation/Examples/Calculations/Database/DSTDEV.php 2 patches
Spacing   +18 added lines, -18 removed lines patch added patch discarded remove patch
@@ -32,21 +32,21 @@  discard block
 block discarded – undo
32 32
 $worksheet = $objPHPExcel->getActiveSheet();
33 33
 
34 34
 // Add some data
35
-$database = array( array( 'Tree',  'Height', 'Age', 'Yield', 'Profit' ),
36
-                   array( 'Apple',  18,       20,    14,      105.00  ),
37
-                   array( 'Pear',   12,       12,    10,       96.00  ),
38
-                   array( 'Cherry', 13,       14,     9,      105.00  ),
39
-                   array( 'Apple',  14,       15,    10,       75.00  ),
40
-                   array( 'Pear',    9,        8,     8,       76.80  ),
41
-                   array( 'Apple',   8,        9,     6,       45.00  ),
35
+$database = array(array('Tree', 'Height', 'Age', 'Yield', 'Profit'),
36
+                   array('Apple', 18, 20, 14, 105.00),
37
+                   array('Pear', 12, 12, 10, 96.00),
38
+                   array('Cherry', 13, 14, 9, 105.00),
39
+                   array('Apple', 14, 15, 10, 75.00),
40
+                   array('Pear', 9, 8, 8, 76.80),
41
+                   array('Apple', 8, 9, 6, 45.00),
42 42
                  );
43
-$criteria = array( array( 'Tree',      'Height', 'Age', 'Yield', 'Profit', 'Height' ),
44
-                   array( '="=Apple"', '>10',    NULL,  NULL,    NULL,     '<16'    ),
45
-                   array( '="=Pear"',  NULL,     NULL,  NULL,    NULL,     NULL     )
43
+$criteria = array(array('Tree', 'Height', 'Age', 'Yield', 'Profit', 'Height'),
44
+                   array('="=Apple"', '>10', NULL, NULL, NULL, '<16'),
45
+                   array('="=Pear"', NULL, NULL, NULL, NULL, NULL)
46 46
                  );
47 47
 
48
-$worksheet->fromArray( $criteria, NULL, 'A1' );
49
-$worksheet->fromArray( $database, NULL, 'A4' );
48
+$worksheet->fromArray($criteria, NULL, 'A1');
49
+$worksheet->fromArray($database, NULL, 'A4');
50 50
 
51 51
 $worksheet->setCellValue('A12', 'The estimated standard deviation in the yield of Apple and Pear trees');
52 52
 $worksheet->setCellValue('B12', '=DSTDEV(A4:E10,"Yield",A1:A3)');
@@ -60,7 +60,7 @@  discard block
 block discarded – undo
60 60
 
61 61
 echo '<h4>Database</h4>';
62 62
 
63
-$databaseData = $worksheet->rangeToArray('A4:E10',null,true,true,true);
63
+$databaseData = $worksheet->rangeToArray('A4:E10', null, true, true, true);
64 64
 var_dump($databaseData);
65 65
 
66 66
 
@@ -70,18 +70,18 @@  discard block
 block discarded – undo
70 70
 // Test the formulae
71 71
 echo '<h4>Criteria</h4>';
72 72
 
73
-$criteriaData = $worksheet->rangeToArray('A1:A3',null,true,true,true);
73
+$criteriaData = $worksheet->rangeToArray('A1:A3', null, true, true, true);
74 74
 var_dump($criteriaData);
75 75
 
76
-echo $worksheet->getCell("A12")->getValue() .'<br />';
77
-echo 'DSTDEV() Result is ' . $worksheet->getCell("B12")->getCalculatedValue() .'<br /><br />';
76
+echo $worksheet->getCell("A12")->getValue() . '<br />';
77
+echo 'DSTDEV() Result is ' . $worksheet->getCell("B12")->getCalculatedValue() . '<br /><br />';
78 78
 
79 79
 echo '<h4>Criteria</h4>';
80 80
 
81
-$criteriaData = $worksheet->rangeToArray('A1:A3',null,true,true,true);
81
+$criteriaData = $worksheet->rangeToArray('A1:A3', null, true, true, true);
82 82
 var_dump($criteriaData);
83 83
 
84
-echo $worksheet->getCell("A13")->getValue() .'<br />';
84
+echo $worksheet->getCell("A13")->getValue() . '<br />';
85 85
 echo 'DSTDEV() Result is ' . $worksheet->getCell("B13")->getCalculatedValue();
86 86
 
87 87
 
Please login to merge, or discard this patch.
Indentation   +10 added lines, -10 removed lines patch added patch discarded remove patch
@@ -33,17 +33,17 @@
 block discarded – undo
33 33
 
34 34
 // Add some data
35 35
 $database = array( array( 'Tree',  'Height', 'Age', 'Yield', 'Profit' ),
36
-                   array( 'Apple',  18,       20,    14,      105.00  ),
37
-                   array( 'Pear',   12,       12,    10,       96.00  ),
38
-                   array( 'Cherry', 13,       14,     9,      105.00  ),
39
-                   array( 'Apple',  14,       15,    10,       75.00  ),
40
-                   array( 'Pear',    9,        8,     8,       76.80  ),
41
-                   array( 'Apple',   8,        9,     6,       45.00  ),
42
-                 );
36
+                    array( 'Apple',  18,       20,    14,      105.00  ),
37
+                    array( 'Pear',   12,       12,    10,       96.00  ),
38
+                    array( 'Cherry', 13,       14,     9,      105.00  ),
39
+                    array( 'Apple',  14,       15,    10,       75.00  ),
40
+                    array( 'Pear',    9,        8,     8,       76.80  ),
41
+                    array( 'Apple',   8,        9,     6,       45.00  ),
42
+                    );
43 43
 $criteria = array( array( 'Tree',      'Height', 'Age', 'Yield', 'Profit', 'Height' ),
44
-                   array( '="=Apple"', '>10',    NULL,  NULL,    NULL,     '<16'    ),
45
-                   array( '="=Pear"',  NULL,     NULL,  NULL,    NULL,     NULL     )
46
-                 );
44
+                    array( '="=Apple"', '>10',    NULL,  NULL,    NULL,     '<16'    ),
45
+                    array( '="=Pear"',  NULL,     NULL,  NULL,    NULL,     NULL     )
46
+                    );
47 47
 
48 48
 $worksheet->fromArray( $criteria, NULL, 'A1' );
49 49
 $worksheet->fromArray( $database, NULL, 'A4' );
Please login to merge, or discard this patch.
Documentation/Examples/Calculations/Database/DCOUNT.php 2 patches
Spacing   +18 added lines, -18 removed lines patch added patch discarded remove patch
@@ -32,21 +32,21 @@  discard block
 block discarded – undo
32 32
 $worksheet = $objPHPExcel->getActiveSheet();
33 33
 
34 34
 // Add some data
35
-$database = array( array( 'Tree',  'Height', 'Age', 'Yield', 'Profit' ),
36
-                   array( 'Apple',  18,       20,    14,      105.00  ),
37
-                   array( 'Pear',   12,       12,    10,       96.00  ),
38
-                   array( 'Cherry', 13,       14,     9,      105.00  ),
39
-                   array( 'Apple',  14,       15,    10,       75.00  ),
40
-                   array( 'Pear',    9,        8,     8,       76.80  ),
41
-                   array( 'Apple',   8,        9,     6,       45.00  ),
35
+$database = array(array('Tree', 'Height', 'Age', 'Yield', 'Profit'),
36
+                   array('Apple', 18, 20, 14, 105.00),
37
+                   array('Pear', 12, 12, 10, 96.00),
38
+                   array('Cherry', 13, 14, 9, 105.00),
39
+                   array('Apple', 14, 15, 10, 75.00),
40
+                   array('Pear', 9, 8, 8, 76.80),
41
+                   array('Apple', 8, 9, 6, 45.00),
42 42
                  );
43
-$criteria = array( array( 'Tree',      'Height', 'Age', 'Yield', 'Profit', 'Height' ),
44
-                   array( '="=Apple"', '>10',    NULL,  NULL,    NULL,     '<16'    ),
45
-                   array( '="=Pear"',  NULL,     NULL,  NULL,    NULL,     NULL     )
43
+$criteria = array(array('Tree', 'Height', 'Age', 'Yield', 'Profit', 'Height'),
44
+                   array('="=Apple"', '>10', NULL, NULL, NULL, '<16'),
45
+                   array('="=Pear"', NULL, NULL, NULL, NULL, NULL)
46 46
                  );
47 47
 
48
-$worksheet->fromArray( $criteria, NULL, 'A1' );
49
-$worksheet->fromArray( $database, NULL, 'A4' );
48
+$worksheet->fromArray($criteria, NULL, 'A1');
49
+$worksheet->fromArray($database, NULL, 'A4');
50 50
 
51 51
 $worksheet->setCellValue('A12', 'The Number of Apple trees over 10\' in height');
52 52
 $worksheet->setCellValue('B12', '=DCOUNT(A4:E10,"Yield",A1:B2)');
@@ -60,7 +60,7 @@  discard block
 block discarded – undo
60 60
 
61 61
 echo '<h4>Database</h4>';
62 62
 
63
-$databaseData = $worksheet->rangeToArray('A4:E10',null,true,true,true);
63
+$databaseData = $worksheet->rangeToArray('A4:E10', null, true, true, true);
64 64
 var_dump($databaseData);
65 65
 
66 66
 
@@ -70,18 +70,18 @@  discard block
 block discarded – undo
70 70
 // Test the formulae
71 71
 echo '<h4>Criteria</h4>';
72 72
 
73
-$criteriaData = $worksheet->rangeToArray('A1:B2',null,true,true,true);
73
+$criteriaData = $worksheet->rangeToArray('A1:B2', null, true, true, true);
74 74
 var_dump($criteriaData);
75 75
 
76
-echo $worksheet->getCell("A12")->getValue() .'<br />';
77
-echo 'DCOUNT() Result is ' . $worksheet->getCell("B12")->getCalculatedValue() .'<br /><br />';
76
+echo $worksheet->getCell("A12")->getValue() . '<br />';
77
+echo 'DCOUNT() Result is ' . $worksheet->getCell("B12")->getCalculatedValue() . '<br /><br />';
78 78
 
79 79
 echo '<h4>Criteria</h4>';
80 80
 
81
-$criteriaData = $worksheet->rangeToArray('A1:A3',null,true,true,true);
81
+$criteriaData = $worksheet->rangeToArray('A1:A3', null, true, true, true);
82 82
 var_dump($criteriaData);
83 83
 
84
-echo $worksheet->getCell("A13")->getValue() .'<br />';
84
+echo $worksheet->getCell("A13")->getValue() . '<br />';
85 85
 echo 'DCOUNT() Result is ' . $worksheet->getCell("B13")->getCalculatedValue();
86 86
 
87 87
 
Please login to merge, or discard this patch.
Indentation   +10 added lines, -10 removed lines patch added patch discarded remove patch
@@ -33,17 +33,17 @@
 block discarded – undo
33 33
 
34 34
 // Add some data
35 35
 $database = array( array( 'Tree',  'Height', 'Age', 'Yield', 'Profit' ),
36
-                   array( 'Apple',  18,       20,    14,      105.00  ),
37
-                   array( 'Pear',   12,       12,    10,       96.00  ),
38
-                   array( 'Cherry', 13,       14,     9,      105.00  ),
39
-                   array( 'Apple',  14,       15,    10,       75.00  ),
40
-                   array( 'Pear',    9,        8,     8,       76.80  ),
41
-                   array( 'Apple',   8,        9,     6,       45.00  ),
42
-                 );
36
+                    array( 'Apple',  18,       20,    14,      105.00  ),
37
+                    array( 'Pear',   12,       12,    10,       96.00  ),
38
+                    array( 'Cherry', 13,       14,     9,      105.00  ),
39
+                    array( 'Apple',  14,       15,    10,       75.00  ),
40
+                    array( 'Pear',    9,        8,     8,       76.80  ),
41
+                    array( 'Apple',   8,        9,     6,       45.00  ),
42
+                    );
43 43
 $criteria = array( array( 'Tree',      'Height', 'Age', 'Yield', 'Profit', 'Height' ),
44
-                   array( '="=Apple"', '>10',    NULL,  NULL,    NULL,     '<16'    ),
45
-                   array( '="=Pear"',  NULL,     NULL,  NULL,    NULL,     NULL     )
46
-                 );
44
+                    array( '="=Apple"', '>10',    NULL,  NULL,    NULL,     '<16'    ),
45
+                    array( '="=Pear"',  NULL,     NULL,  NULL,    NULL,     NULL     )
46
+                    );
47 47
 
48 48
 $worksheet->fromArray( $criteria, NULL, 'A1' );
49 49
 $worksheet->fromArray( $database, NULL, 'A4' );
Please login to merge, or discard this patch.
Documentation/Examples/Calculations/Database/DGET.php 2 patches
Spacing   +17 added lines, -17 removed lines patch added patch discarded remove patch
@@ -32,21 +32,21 @@  discard block
 block discarded – undo
32 32
 $worksheet = $objPHPExcel->getActiveSheet();
33 33
 
34 34
 // Add some data
35
-$database = array( array( 'Tree',  'Height', 'Age', 'Yield', 'Profit' ),
36
-                   array( 'Apple',  18,       20,    14,      105.00  ),
37
-                   array( 'Pear',   12,       12,    10,       96.00  ),
38
-                   array( 'Cherry', 13,       14,     9,      105.00  ),
39
-                   array( 'Apple',  14,       15,    10,       75.00  ),
40
-                   array( 'Pear',    9,        8,     8,       76.80  ),
41
-                   array( 'Apple',   8,        9,     6,       45.00  ),
35
+$database = array(array('Tree', 'Height', 'Age', 'Yield', 'Profit'),
36
+                   array('Apple', 18, 20, 14, 105.00),
37
+                   array('Pear', 12, 12, 10, 96.00),
38
+                   array('Cherry', 13, 14, 9, 105.00),
39
+                   array('Apple', 14, 15, 10, 75.00),
40
+                   array('Pear', 9, 8, 8, 76.80),
41
+                   array('Apple', 8, 9, 6, 45.00),
42 42
                  );
43
-$criteria = array( array( 'Tree',      'Height', 'Age', 'Yield', 'Profit', 'Height' ),
44
-                   array( '="=Apple"', '>10',    NULL,  NULL,    NULL,     '<16'    ),
45
-                   array( '="=Pear"',  NULL,     NULL,  NULL,    NULL,     NULL     )
43
+$criteria = array(array('Tree', 'Height', 'Age', 'Yield', 'Profit', 'Height'),
44
+                   array('="=Apple"', '>10', NULL, NULL, NULL, '<16'),
45
+                   array('="=Pear"', NULL, NULL, NULL, NULL, NULL)
46 46
                  );
47 47
 
48
-$worksheet->fromArray( $criteria, NULL, 'A1' );
49
-$worksheet->fromArray( $database, NULL, 'A4' );
48
+$worksheet->fromArray($criteria, NULL, 'A1');
49
+$worksheet->fromArray($database, NULL, 'A4');
50 50
 
51 51
 $worksheet->setCellValue('A12', 'The height of the Apple tree between 10\' and 16\' tall');
52 52
 $worksheet->setCellValue('B12', '=DGET(A4:E10,"Height",A1:F2)');
@@ -57,7 +57,7 @@  discard block
 block discarded – undo
57 57
 
58 58
 echo '<h4>Database</h4>';
59 59
 
60
-$databaseData = $worksheet->rangeToArray('A4:E10',null,true,true,true);
60
+$databaseData = $worksheet->rangeToArray('A4:E10', null, true, true, true);
61 61
 var_dump($databaseData);
62 62
 
63 63
 
@@ -69,15 +69,15 @@  discard block
 block discarded – undo
69 69
 
70 70
 echo 'ALL' . '<br /><br />';
71 71
 
72
-echo $worksheet->getCell("A12")->getValue() .'<br />';
73
-echo 'DMAX() Result is ' . $worksheet->getCell("B12")->getCalculatedValue() .'<br /><br />';
72
+echo $worksheet->getCell("A12")->getValue() . '<br />';
73
+echo 'DMAX() Result is ' . $worksheet->getCell("B12")->getCalculatedValue() . '<br /><br />';
74 74
 
75 75
 echo '<h4>Criteria</h4>';
76 76
 
77
-$criteriaData = $worksheet->rangeToArray('A1:A2',null,true,true,true);
77
+$criteriaData = $worksheet->rangeToArray('A1:A2', null, true, true, true);
78 78
 var_dump($criteriaData);
79 79
 
80
-echo $worksheet->getCell("A13")->getValue() .'<br />';
80
+echo $worksheet->getCell("A13")->getValue() . '<br />';
81 81
 echo 'DMAX() Result is ' . $worksheet->getCell("B13")->getCalculatedValue();
82 82
 
83 83
 
Please login to merge, or discard this patch.
Indentation   +10 added lines, -10 removed lines patch added patch discarded remove patch
@@ -33,17 +33,17 @@
 block discarded – undo
33 33
 
34 34
 // Add some data
35 35
 $database = array( array( 'Tree',  'Height', 'Age', 'Yield', 'Profit' ),
36
-                   array( 'Apple',  18,       20,    14,      105.00  ),
37
-                   array( 'Pear',   12,       12,    10,       96.00  ),
38
-                   array( 'Cherry', 13,       14,     9,      105.00  ),
39
-                   array( 'Apple',  14,       15,    10,       75.00  ),
40
-                   array( 'Pear',    9,        8,     8,       76.80  ),
41
-                   array( 'Apple',   8,        9,     6,       45.00  ),
42
-                 );
36
+                    array( 'Apple',  18,       20,    14,      105.00  ),
37
+                    array( 'Pear',   12,       12,    10,       96.00  ),
38
+                    array( 'Cherry', 13,       14,     9,      105.00  ),
39
+                    array( 'Apple',  14,       15,    10,       75.00  ),
40
+                    array( 'Pear',    9,        8,     8,       76.80  ),
41
+                    array( 'Apple',   8,        9,     6,       45.00  ),
42
+                    );
43 43
 $criteria = array( array( 'Tree',      'Height', 'Age', 'Yield', 'Profit', 'Height' ),
44
-                   array( '="=Apple"', '>10',    NULL,  NULL,    NULL,     '<16'    ),
45
-                   array( '="=Pear"',  NULL,     NULL,  NULL,    NULL,     NULL     )
46
-                 );
44
+                    array( '="=Apple"', '>10',    NULL,  NULL,    NULL,     '<16'    ),
45
+                    array( '="=Pear"',  NULL,     NULL,  NULL,    NULL,     NULL     )
46
+                    );
47 47
 
48 48
 $worksheet->fromArray( $criteria, NULL, 'A1' );
49 49
 $worksheet->fromArray( $database, NULL, 'A4' );
Please login to merge, or discard this patch.
Documentation/Examples/Calculations/Database/DSTDEVP.php 2 patches
Indentation   +10 added lines, -10 removed lines patch added patch discarded remove patch
@@ -33,17 +33,17 @@
 block discarded – undo
33 33
 
34 34
 // Add some data
35 35
 $database = array( array( 'Tree',  'Height', 'Age', 'Yield', 'Profit' ),
36
-                   array( 'Apple',  18,       20,    14,      105.00  ),
37
-                   array( 'Pear',   12,       12,    10,       96.00  ),
38
-                   array( 'Cherry', 13,       14,     9,      105.00  ),
39
-                   array( 'Apple',  14,       15,    10,       75.00  ),
40
-                   array( 'Pear',    9,        8,     8,       76.80  ),
41
-                   array( 'Apple',   8,        9,     6,       45.00  ),
42
-                 );
36
+                    array( 'Apple',  18,       20,    14,      105.00  ),
37
+                    array( 'Pear',   12,       12,    10,       96.00  ),
38
+                    array( 'Cherry', 13,       14,     9,      105.00  ),
39
+                    array( 'Apple',  14,       15,    10,       75.00  ),
40
+                    array( 'Pear',    9,        8,     8,       76.80  ),
41
+                    array( 'Apple',   8,        9,     6,       45.00  ),
42
+                    );
43 43
 $criteria = array( array( 'Tree',      'Height', 'Age', 'Yield', 'Profit', 'Height' ),
44
-                   array( '="=Apple"', '>10',    NULL,  NULL,    NULL,     '<16'    ),
45
-                   array( '="=Pear"',  NULL,     NULL,  NULL,    NULL,     NULL     )
46
-                 );
44
+                    array( '="=Apple"', '>10',    NULL,  NULL,    NULL,     '<16'    ),
45
+                    array( '="=Pear"',  NULL,     NULL,  NULL,    NULL,     NULL     )
46
+                    );
47 47
 
48 48
 $worksheet->fromArray( $criteria, NULL, 'A1' );
49 49
 $worksheet->fromArray( $database, NULL, 'A4' );
Please login to merge, or discard this patch.
Spacing   +18 added lines, -18 removed lines patch added patch discarded remove patch
@@ -32,21 +32,21 @@  discard block
 block discarded – undo
32 32
 $worksheet = $objPHPExcel->getActiveSheet();
33 33
 
34 34
 // Add some data
35
-$database = array( array( 'Tree',  'Height', 'Age', 'Yield', 'Profit' ),
36
-                   array( 'Apple',  18,       20,    14,      105.00  ),
37
-                   array( 'Pear',   12,       12,    10,       96.00  ),
38
-                   array( 'Cherry', 13,       14,     9,      105.00  ),
39
-                   array( 'Apple',  14,       15,    10,       75.00  ),
40
-                   array( 'Pear',    9,        8,     8,       76.80  ),
41
-                   array( 'Apple',   8,        9,     6,       45.00  ),
35
+$database = array(array('Tree', 'Height', 'Age', 'Yield', 'Profit'),
36
+                   array('Apple', 18, 20, 14, 105.00),
37
+                   array('Pear', 12, 12, 10, 96.00),
38
+                   array('Cherry', 13, 14, 9, 105.00),
39
+                   array('Apple', 14, 15, 10, 75.00),
40
+                   array('Pear', 9, 8, 8, 76.80),
41
+                   array('Apple', 8, 9, 6, 45.00),
42 42
                  );
43
-$criteria = array( array( 'Tree',      'Height', 'Age', 'Yield', 'Profit', 'Height' ),
44
-                   array( '="=Apple"', '>10',    NULL,  NULL,    NULL,     '<16'    ),
45
-                   array( '="=Pear"',  NULL,     NULL,  NULL,    NULL,     NULL     )
43
+$criteria = array(array('Tree', 'Height', 'Age', 'Yield', 'Profit', 'Height'),
44
+                   array('="=Apple"', '>10', NULL, NULL, NULL, '<16'),
45
+                   array('="=Pear"', NULL, NULL, NULL, NULL, NULL)
46 46
                  );
47 47
 
48
-$worksheet->fromArray( $criteria, NULL, 'A1' );
49
-$worksheet->fromArray( $database, NULL, 'A4' );
48
+$worksheet->fromArray($criteria, NULL, 'A1');
49
+$worksheet->fromArray($database, NULL, 'A4');
50 50
 
51 51
 $worksheet->setCellValue('A12', 'The standard deviation in the yield of Apple and Pear trees');
52 52
 $worksheet->setCellValue('B12', '=DSTDEVP(A4:E10,"Yield",A1:A3)');
@@ -60,7 +60,7 @@  discard block
 block discarded – undo
60 60
 
61 61
 echo '<h4>Database</h4>';
62 62
 
63
-$databaseData = $worksheet->rangeToArray('A4:E10',null,true,true,true);
63
+$databaseData = $worksheet->rangeToArray('A4:E10', null, true, true, true);
64 64
 var_dump($databaseData);
65 65
 
66 66
 
@@ -70,18 +70,18 @@  discard block
 block discarded – undo
70 70
 // Test the formulae
71 71
 echo '<h4>Criteria</h4>';
72 72
 
73
-$criteriaData = $worksheet->rangeToArray('A1:A3',null,true,true,true);
73
+$criteriaData = $worksheet->rangeToArray('A1:A3', null, true, true, true);
74 74
 var_dump($criteriaData);
75 75
 
76
-echo $worksheet->getCell("A12")->getValue() .'<br />';
77
-echo 'DSTDEVP() Result is ' . $worksheet->getCell("B12")->getCalculatedValue() .'<br /><br />';
76
+echo $worksheet->getCell("A12")->getValue() . '<br />';
77
+echo 'DSTDEVP() Result is ' . $worksheet->getCell("B12")->getCalculatedValue() . '<br /><br />';
78 78
 
79 79
 echo '<h4>Criteria</h4>';
80 80
 
81
-$criteriaData = $worksheet->rangeToArray('A1:A3',null,true,true,true);
81
+$criteriaData = $worksheet->rangeToArray('A1:A3', null, true, true, true);
82 82
 var_dump($criteriaData);
83 83
 
84
-echo $worksheet->getCell("A13")->getValue() .'<br />';
84
+echo $worksheet->getCell("A13")->getValue() . '<br />';
85 85
 echo 'DSTDEVP() Result is ' . $worksheet->getCell("B13")->getCalculatedValue();
86 86
 
87 87
 
Please login to merge, or discard this patch.
Documentation/Examples/Calculations/DateTime/DATEVALUE.php 2 patches
Indentation   +18 added lines, -18 removed lines patch added patch discarded remove patch
@@ -33,21 +33,21 @@  discard block
 block discarded – undo
33 33
 
34 34
 // Add some data
35 35
 $testDates = array(	'26 March 2012',	'29 Feb 2012',	'April 1, 2012',	'25/12/2012',
36
-					'2012-Oct-31',		'5th November',	'January 1st',		'April 2012',
37
-					'17-03',			'03-2012',		'29 Feb 2011',		'03-05-07',
38
-					'03-MAY-07',		'03-13-07',
39
-				  );
36
+                    '2012-Oct-31',		'5th November',	'January 1st',		'April 2012',
37
+                    '17-03',			'03-2012',		'29 Feb 2011',		'03-05-07',
38
+                    '03-MAY-07',		'03-13-07',
39
+                    );
40 40
 $testDateCount = count($testDates);
41 41
 
42 42
 for($row = 1; $row <= $testDateCount; ++$row) {
43
-	$worksheet->setCellValue('A'.$row, $testDates[$row-1]);
44
-	$worksheet->setCellValue('B'.$row, '=DATEVALUE(A'.$row.')');
45
-	$worksheet->setCellValue('C'.$row, '=B'.$row);
43
+    $worksheet->setCellValue('A'.$row, $testDates[$row-1]);
44
+    $worksheet->setCellValue('B'.$row, '=DATEVALUE(A'.$row.')');
45
+    $worksheet->setCellValue('C'.$row, '=B'.$row);
46 46
 }
47 47
 
48 48
 $worksheet->getStyle('C1:C'.$testDateCount)
49
-          ->getNumberFormat()
50
-          ->setFormatCode('yyyy-mmm-dd');
49
+            ->getNumberFormat()
50
+            ->setFormatCode('yyyy-mmm-dd');
51 51
 
52 52
 
53 53
 echo '<hr />';
@@ -64,13 +64,13 @@  discard block
 block discarded – undo
64 64
 		<th>Formatted DateStamp</th>
65 65
 	</tr>
66 66
 	<?php
67
-	for ($row = 1; $row <= $testDateCount; ++$row) {
68
-		echo '<tr>';
69
-		    echo '<td>' , $worksheet->getCell('A'.$row)->getFormattedValue() , '</td>';
70
-			echo '<td>' , $worksheet->getCell('B'.$row)->getValue() , '</td>';
71
-			echo '<td>' , $worksheet->getCell('B'.$row)->getFormattedValue() , '</td>';
72
-			echo '<td>' , $worksheet->getCell('C'.$row)->getFormattedValue() , '</td>';
73
-		echo '</tr>';
74
-	}
75
-	?>
67
+    for ($row = 1; $row <= $testDateCount; ++$row) {
68
+        echo '<tr>';
69
+            echo '<td>' , $worksheet->getCell('A'.$row)->getFormattedValue() , '</td>';
70
+            echo '<td>' , $worksheet->getCell('B'.$row)->getValue() , '</td>';
71
+            echo '<td>' , $worksheet->getCell('B'.$row)->getFormattedValue() , '</td>';
72
+            echo '<td>' , $worksheet->getCell('C'.$row)->getFormattedValue() , '</td>';
73
+        echo '</tr>';
74
+    }
75
+    ?>
76 76
 </table>
77 77
\ No newline at end of file
Please login to merge, or discard this patch.
Spacing   +13 added lines, -13 removed lines patch added patch discarded remove patch
@@ -32,20 +32,20 @@  discard block
 block discarded – undo
32 32
 $worksheet = $objPHPExcel->getActiveSheet();
33 33
 
34 34
 // Add some data
35
-$testDates = array(	'26 March 2012',	'29 Feb 2012',	'April 1, 2012',	'25/12/2012',
36
-					'2012-Oct-31',		'5th November',	'January 1st',		'April 2012',
37
-					'17-03',			'03-2012',		'29 Feb 2011',		'03-05-07',
38
-					'03-MAY-07',		'03-13-07',
35
+$testDates = array('26 March 2012', '29 Feb 2012', 'April 1, 2012', '25/12/2012',
36
+					'2012-Oct-31', '5th November', 'January 1st', 'April 2012',
37
+					'17-03', '03-2012', '29 Feb 2011', '03-05-07',
38
+					'03-MAY-07', '03-13-07',
39 39
 				  );
40 40
 $testDateCount = count($testDates);
41 41
 
42
-for($row = 1; $row <= $testDateCount; ++$row) {
43
-	$worksheet->setCellValue('A'.$row, $testDates[$row-1]);
44
-	$worksheet->setCellValue('B'.$row, '=DATEVALUE(A'.$row.')');
45
-	$worksheet->setCellValue('C'.$row, '=B'.$row);
42
+for ($row = 1; $row <= $testDateCount; ++$row) {
43
+	$worksheet->setCellValue('A' . $row, $testDates[$row - 1]);
44
+	$worksheet->setCellValue('B' . $row, '=DATEVALUE(A' . $row . ')');
45
+	$worksheet->setCellValue('C' . $row, '=B' . $row);
46 46
 }
47 47
 
48
-$worksheet->getStyle('C1:C'.$testDateCount)
48
+$worksheet->getStyle('C1:C' . $testDateCount)
49 49
           ->getNumberFormat()
50 50
           ->setFormatCode('yyyy-mmm-dd');
51 51
 
@@ -66,10 +66,10 @@  discard block
 block discarded – undo
66 66
 	<?php
67 67
 	for ($row = 1; $row <= $testDateCount; ++$row) {
68 68
 		echo '<tr>';
69
-		    echo '<td>' , $worksheet->getCell('A'.$row)->getFormattedValue() , '</td>';
70
-			echo '<td>' , $worksheet->getCell('B'.$row)->getValue() , '</td>';
71
-			echo '<td>' , $worksheet->getCell('B'.$row)->getFormattedValue() , '</td>';
72
-			echo '<td>' , $worksheet->getCell('C'.$row)->getFormattedValue() , '</td>';
69
+		    echo '<td>', $worksheet->getCell('A' . $row)->getFormattedValue(), '</td>';
70
+			echo '<td>', $worksheet->getCell('B' . $row)->getValue(), '</td>';
71
+			echo '<td>', $worksheet->getCell('B' . $row)->getFormattedValue(), '</td>';
72
+			echo '<td>', $worksheet->getCell('C' . $row)->getFormattedValue(), '</td>';
73 73
 		echo '</tr>';
74 74
 	}
75 75
 	?>
Please login to merge, or discard this patch.
Documentation/Examples/Calculations/DateTime/DATE.php 2 patches
Indentation   +20 added lines, -20 removed lines patch added patch discarded remove patch
@@ -33,22 +33,22 @@  discard block
 block discarded – undo
33 33
 
34 34
 // Add some data
35 35
 $testDates = array(	array(2012,3,26),	array(2012,2,29),	array(2012,4,1),	array(2012,12,25),
36
-					array(2012,10,31),	array(2012,11,5),	array(2012,1,1),	array(2012,3,17),
37
-					array(2011,2,29),	array(7,5,3),		array(2012,13,1),	array(2012,11,45),
38
-					array(2012,0,0),	array(2012,1,0),	array(2012,0,1),
39
-					array(2012,-2,2),	array(2012,2,-2),	array(2012,-2,-2),
40
-				  );
36
+                    array(2012,10,31),	array(2012,11,5),	array(2012,1,1),	array(2012,3,17),
37
+                    array(2011,2,29),	array(7,5,3),		array(2012,13,1),	array(2012,11,45),
38
+                    array(2012,0,0),	array(2012,1,0),	array(2012,0,1),
39
+                    array(2012,-2,2),	array(2012,2,-2),	array(2012,-2,-2),
40
+                    );
41 41
 $testDateCount = count($testDates);
42 42
 
43 43
 $worksheet->fromArray($testDates,NULL,'A1',true);
44 44
 
45 45
 for ($row = 1; $row <= $testDateCount; ++$row) {
46
-	$worksheet->setCellValue('D'.$row, '=DATE(A'.$row.',B'.$row.',C'.$row.')');
47
-	$worksheet->setCellValue('E'.$row, '=D'.$row);
46
+    $worksheet->setCellValue('D'.$row, '=DATE(A'.$row.',B'.$row.',C'.$row.')');
47
+    $worksheet->setCellValue('E'.$row, '=D'.$row);
48 48
 }
49 49
 $worksheet->getStyle('E1:E'.$testDateCount)
50
-          ->getNumberFormat()
51
-          ->setFormatCode('yyyy-mmm-dd');
50
+            ->getNumberFormat()
51
+            ->setFormatCode('yyyy-mmm-dd');
52 52
 
53 53
 
54 54
 echo '<hr />';
@@ -69,15 +69,15 @@  discard block
 block discarded – undo
69 69
 		<th>Day</th>
70 70
 	<tr>
71 71
 	<?php
72
-	for ($row = 1; $row <= $testDateCount; ++$row) {
73
-		echo '<tr>';
74
-		    echo '<td>' , $worksheet->getCell('A'.$row)->getFormattedValue() , '</td>';
75
-			echo '<td>' , $worksheet->getCell('B'.$row)->getFormattedValue() , '</td>';
76
-			echo '<td>' , $worksheet->getCell('C'.$row)->getFormattedValue() , '</td>';
77
-			echo '<td>' , $worksheet->getCell('D'.$row)->getValue() , '</td>';
78
-			echo '<td>' , $worksheet->getCell('D'.$row)->getFormattedValue() , '</td>';
79
-			echo '<td>' , $worksheet->getCell('E'.$row)->getFormattedValue() , '</td>';
80
-		echo '</tr>';
81
-	}
82
-	?>
72
+    for ($row = 1; $row <= $testDateCount; ++$row) {
73
+        echo '<tr>';
74
+            echo '<td>' , $worksheet->getCell('A'.$row)->getFormattedValue() , '</td>';
75
+            echo '<td>' , $worksheet->getCell('B'.$row)->getFormattedValue() , '</td>';
76
+            echo '<td>' , $worksheet->getCell('C'.$row)->getFormattedValue() , '</td>';
77
+            echo '<td>' , $worksheet->getCell('D'.$row)->getValue() , '</td>';
78
+            echo '<td>' , $worksheet->getCell('D'.$row)->getFormattedValue() , '</td>';
79
+            echo '<td>' , $worksheet->getCell('E'.$row)->getFormattedValue() , '</td>';
80
+        echo '</tr>';
81
+    }
82
+    ?>
83 83
 </table>
84 84
\ No newline at end of file
Please login to merge, or discard this patch.
Spacing   +15 added lines, -15 removed lines patch added patch discarded remove patch
@@ -32,21 +32,21 @@  discard block
 block discarded – undo
32 32
 $worksheet = $objPHPExcel->getActiveSheet();
33 33
 
34 34
 // Add some data
35
-$testDates = array(	array(2012,3,26),	array(2012,2,29),	array(2012,4,1),	array(2012,12,25),
36
-					array(2012,10,31),	array(2012,11,5),	array(2012,1,1),	array(2012,3,17),
37
-					array(2011,2,29),	array(7,5,3),		array(2012,13,1),	array(2012,11,45),
38
-					array(2012,0,0),	array(2012,1,0),	array(2012,0,1),
39
-					array(2012,-2,2),	array(2012,2,-2),	array(2012,-2,-2),
35
+$testDates = array(array(2012, 3, 26), array(2012, 2, 29), array(2012, 4, 1), array(2012, 12, 25),
36
+					array(2012, 10, 31), array(2012, 11, 5), array(2012, 1, 1), array(2012, 3, 17),
37
+					array(2011, 2, 29), array(7, 5, 3), array(2012, 13, 1), array(2012, 11, 45),
38
+					array(2012, 0, 0), array(2012, 1, 0), array(2012, 0, 1),
39
+					array(2012, -2, 2), array(2012, 2, -2), array(2012, -2, -2),
40 40
 				  );
41 41
 $testDateCount = count($testDates);
42 42
 
43
-$worksheet->fromArray($testDates,NULL,'A1',true);
43
+$worksheet->fromArray($testDates, NULL, 'A1', true);
44 44
 
45 45
 for ($row = 1; $row <= $testDateCount; ++$row) {
46
-	$worksheet->setCellValue('D'.$row, '=DATE(A'.$row.',B'.$row.',C'.$row.')');
47
-	$worksheet->setCellValue('E'.$row, '=D'.$row);
46
+	$worksheet->setCellValue('D' . $row, '=DATE(A' . $row . ',B' . $row . ',C' . $row . ')');
47
+	$worksheet->setCellValue('E' . $row, '=D' . $row);
48 48
 }
49
-$worksheet->getStyle('E1:E'.$testDateCount)
49
+$worksheet->getStyle('E1:E' . $testDateCount)
50 50
           ->getNumberFormat()
51 51
           ->setFormatCode('yyyy-mmm-dd');
52 52
 
@@ -71,12 +71,12 @@  discard block
 block discarded – undo
71 71
 	<?php
72 72
 	for ($row = 1; $row <= $testDateCount; ++$row) {
73 73
 		echo '<tr>';
74
-		    echo '<td>' , $worksheet->getCell('A'.$row)->getFormattedValue() , '</td>';
75
-			echo '<td>' , $worksheet->getCell('B'.$row)->getFormattedValue() , '</td>';
76
-			echo '<td>' , $worksheet->getCell('C'.$row)->getFormattedValue() , '</td>';
77
-			echo '<td>' , $worksheet->getCell('D'.$row)->getValue() , '</td>';
78
-			echo '<td>' , $worksheet->getCell('D'.$row)->getFormattedValue() , '</td>';
79
-			echo '<td>' , $worksheet->getCell('E'.$row)->getFormattedValue() , '</td>';
74
+		    echo '<td>', $worksheet->getCell('A' . $row)->getFormattedValue(), '</td>';
75
+			echo '<td>', $worksheet->getCell('B' . $row)->getFormattedValue(), '</td>';
76
+			echo '<td>', $worksheet->getCell('C' . $row)->getFormattedValue(), '</td>';
77
+			echo '<td>', $worksheet->getCell('D' . $row)->getValue(), '</td>';
78
+			echo '<td>', $worksheet->getCell('D' . $row)->getFormattedValue(), '</td>';
79
+			echo '<td>', $worksheet->getCell('E' . $row)->getFormattedValue(), '</td>';
80 80
 		echo '</tr>';
81 81
 	}
82 82
 	?>
Please login to merge, or discard this patch.
Documentation/Examples/Calculations/DateTime/TIME.php 2 patches
Indentation   +18 added lines, -18 removed lines patch added patch discarded remove patch
@@ -33,20 +33,20 @@  discard block
 block discarded – undo
33 33
 
34 34
 // Add some data
35 35
 $testDates = array(	array(3,15),		array(13,15),	array(15,15,15),	array(3,15,30),
36
-					array(15,15,15),	array(5),		array(9,15,0),		array(9,15,-1),
37
-					array(13,-14,-15),	array(0,0,-1)
38
-				  );
36
+                    array(15,15,15),	array(5),		array(9,15,0),		array(9,15,-1),
37
+                    array(13,-14,-15),	array(0,0,-1)
38
+                    );
39 39
 $testDateCount = count($testDates);
40 40
 
41 41
 $worksheet->fromArray($testDates,NULL,'A1',true);
42 42
 
43 43
 for ($row = 1; $row <= $testDateCount; ++$row) {
44
-	$worksheet->setCellValue('D'.$row, '=TIME(A'.$row.',B'.$row.',C'.$row.')');
45
-	$worksheet->setCellValue('E'.$row, '=D'.$row);
44
+    $worksheet->setCellValue('D'.$row, '=TIME(A'.$row.',B'.$row.',C'.$row.')');
45
+    $worksheet->setCellValue('E'.$row, '=D'.$row);
46 46
 }
47 47
 $worksheet->getStyle('E1:E'.$testDateCount)
48
-          ->getNumberFormat()
49
-          ->setFormatCode('hh:mm:ss');
48
+            ->getNumberFormat()
49
+            ->setFormatCode('hh:mm:ss');
50 50
 
51 51
 
52 52
 echo '<hr />';
@@ -67,15 +67,15 @@  discard block
 block discarded – undo
67 67
 		<th>Second</th>
68 68
 	<tr>
69 69
 	<?php
70
-	for ($row = 1; $row <= $testDateCount; ++$row) {
71
-		echo '<tr>';
72
-		    echo '<td>' , $worksheet->getCell('A'.$row)->getFormattedValue() , '</td>';
73
-			echo '<td>' , $worksheet->getCell('B'.$row)->getFormattedValue() , '</td>';
74
-			echo '<td>' , $worksheet->getCell('C'.$row)->getFormattedValue() , '</td>';
75
-			echo '<td>' , $worksheet->getCell('D'.$row)->getValue() , '</td>';
76
-			echo '<td>' , $worksheet->getCell('D'.$row)->getFormattedValue() , '</td>';
77
-			echo '<td>' , $worksheet->getCell('E'.$row)->getFormattedValue() , '</td>';
78
-		echo '</tr>';
79
-	}
80
-	?>
70
+    for ($row = 1; $row <= $testDateCount; ++$row) {
71
+        echo '<tr>';
72
+            echo '<td>' , $worksheet->getCell('A'.$row)->getFormattedValue() , '</td>';
73
+            echo '<td>' , $worksheet->getCell('B'.$row)->getFormattedValue() , '</td>';
74
+            echo '<td>' , $worksheet->getCell('C'.$row)->getFormattedValue() , '</td>';
75
+            echo '<td>' , $worksheet->getCell('D'.$row)->getValue() , '</td>';
76
+            echo '<td>' , $worksheet->getCell('D'.$row)->getFormattedValue() , '</td>';
77
+            echo '<td>' , $worksheet->getCell('E'.$row)->getFormattedValue() , '</td>';
78
+        echo '</tr>';
79
+    }
80
+    ?>
81 81
 </table>
82 82
\ No newline at end of file
Please login to merge, or discard this patch.
Spacing   +13 added lines, -13 removed lines patch added patch discarded remove patch
@@ -32,19 +32,19 @@  discard block
 block discarded – undo
32 32
 $worksheet = $objPHPExcel->getActiveSheet();
33 33
 
34 34
 // Add some data
35
-$testDates = array(	array(3,15),		array(13,15),	array(15,15,15),	array(3,15,30),
36
-					array(15,15,15),	array(5),		array(9,15,0),		array(9,15,-1),
37
-					array(13,-14,-15),	array(0,0,-1)
35
+$testDates = array(array(3, 15), array(13, 15), array(15, 15, 15), array(3, 15, 30),
36
+					array(15, 15, 15), array(5), array(9, 15, 0), array(9, 15, -1),
37
+					array(13, -14, -15), array(0, 0, -1)
38 38
 				  );
39 39
 $testDateCount = count($testDates);
40 40
 
41
-$worksheet->fromArray($testDates,NULL,'A1',true);
41
+$worksheet->fromArray($testDates, NULL, 'A1', true);
42 42
 
43 43
 for ($row = 1; $row <= $testDateCount; ++$row) {
44
-	$worksheet->setCellValue('D'.$row, '=TIME(A'.$row.',B'.$row.',C'.$row.')');
45
-	$worksheet->setCellValue('E'.$row, '=D'.$row);
44
+	$worksheet->setCellValue('D' . $row, '=TIME(A' . $row . ',B' . $row . ',C' . $row . ')');
45
+	$worksheet->setCellValue('E' . $row, '=D' . $row);
46 46
 }
47
-$worksheet->getStyle('E1:E'.$testDateCount)
47
+$worksheet->getStyle('E1:E' . $testDateCount)
48 48
           ->getNumberFormat()
49 49
           ->setFormatCode('hh:mm:ss');
50 50
 
@@ -69,12 +69,12 @@  discard block
 block discarded – undo
69 69
 	<?php
70 70
 	for ($row = 1; $row <= $testDateCount; ++$row) {
71 71
 		echo '<tr>';
72
-		    echo '<td>' , $worksheet->getCell('A'.$row)->getFormattedValue() , '</td>';
73
-			echo '<td>' , $worksheet->getCell('B'.$row)->getFormattedValue() , '</td>';
74
-			echo '<td>' , $worksheet->getCell('C'.$row)->getFormattedValue() , '</td>';
75
-			echo '<td>' , $worksheet->getCell('D'.$row)->getValue() , '</td>';
76
-			echo '<td>' , $worksheet->getCell('D'.$row)->getFormattedValue() , '</td>';
77
-			echo '<td>' , $worksheet->getCell('E'.$row)->getFormattedValue() , '</td>';
72
+		    echo '<td>', $worksheet->getCell('A' . $row)->getFormattedValue(), '</td>';
73
+			echo '<td>', $worksheet->getCell('B' . $row)->getFormattedValue(), '</td>';
74
+			echo '<td>', $worksheet->getCell('C' . $row)->getFormattedValue(), '</td>';
75
+			echo '<td>', $worksheet->getCell('D' . $row)->getValue(), '</td>';
76
+			echo '<td>', $worksheet->getCell('D' . $row)->getFormattedValue(), '</td>';
77
+			echo '<td>', $worksheet->getCell('E' . $row)->getFormattedValue(), '</td>';
78 78
 		echo '</tr>';
79 79
 	}
80 80
 	?>
Please login to merge, or discard this patch.
Documentation/Examples/Calculations/DateTime/TIMEVALUE.php 2 patches
Indentation   +15 added lines, -15 removed lines patch added patch discarded remove patch
@@ -33,18 +33,18 @@  discard block
 block discarded – undo
33 33
 
34 34
 // Add some data
35 35
 $testDates = array(	'3:15',	'13:15',	'15:15:15',	'3:15 AM',	'3:15 PM',	'5PM',	'9:15AM',	'13:15AM'
36
-				  );
36
+                    );
37 37
 $testDateCount = count($testDates);
38 38
 
39 39
 for($row = 1; $row <= $testDateCount; ++$row) {
40
-	$worksheet->setCellValue('A'.$row, $testDates[$row-1]);
41
-	$worksheet->setCellValue('B'.$row, '=TIMEVALUE(A'.$row.')');
42
-	$worksheet->setCellValue('C'.$row, '=B'.$row);
40
+    $worksheet->setCellValue('A'.$row, $testDates[$row-1]);
41
+    $worksheet->setCellValue('B'.$row, '=TIMEVALUE(A'.$row.')');
42
+    $worksheet->setCellValue('C'.$row, '=B'.$row);
43 43
 }
44 44
 
45 45
 $worksheet->getStyle('C1:C'.$testDateCount)
46
-          ->getNumberFormat()
47
-          ->setFormatCode('hh:mm:ss');
46
+            ->getNumberFormat()
47
+            ->setFormatCode('hh:mm:ss');
48 48
 
49 49
 
50 50
 echo '<hr />';
@@ -60,13 +60,13 @@  discard block
 block discarded – undo
60 60
 		<th>Formatted TimeStamp</th>
61 61
 	</tr>
62 62
 	<?php
63
-	for ($row = 1; $row <= $testDateCount; ++$row) {
64
-		echo '<tr>';
65
-		    echo '<td>' , $worksheet->getCell('A'.$row)->getFormattedValue() , '</td>';
66
-			echo '<td>' , $worksheet->getCell('B'.$row)->getValue() , '</td>';
67
-			echo '<td>' , $worksheet->getCell('B'.$row)->getFormattedValue() , '</td>';
68
-			echo '<td>' , $worksheet->getCell('C'.$row)->getFormattedValue() , '</td>';
69
-		echo '</tr>';
70
-	}
71
-	?>
63
+    for ($row = 1; $row <= $testDateCount; ++$row) {
64
+        echo '<tr>';
65
+            echo '<td>' , $worksheet->getCell('A'.$row)->getFormattedValue() , '</td>';
66
+            echo '<td>' , $worksheet->getCell('B'.$row)->getValue() , '</td>';
67
+            echo '<td>' , $worksheet->getCell('B'.$row)->getFormattedValue() , '</td>';
68
+            echo '<td>' , $worksheet->getCell('C'.$row)->getFormattedValue() , '</td>';
69
+        echo '</tr>';
70
+    }
71
+    ?>
72 72
 </table>
73 73
\ No newline at end of file
Please login to merge, or discard this patch.
Spacing   +10 added lines, -10 removed lines patch added patch discarded remove patch
@@ -32,17 +32,17 @@  discard block
 block discarded – undo
32 32
 $worksheet = $objPHPExcel->getActiveSheet();
33 33
 
34 34
 // Add some data
35
-$testDates = array(	'3:15',	'13:15',	'15:15:15',	'3:15 AM',	'3:15 PM',	'5PM',	'9:15AM',	'13:15AM'
35
+$testDates = array('3:15', '13:15', '15:15:15', '3:15 AM', '3:15 PM', '5PM', '9:15AM', '13:15AM'
36 36
 				  );
37 37
 $testDateCount = count($testDates);
38 38
 
39
-for($row = 1; $row <= $testDateCount; ++$row) {
40
-	$worksheet->setCellValue('A'.$row, $testDates[$row-1]);
41
-	$worksheet->setCellValue('B'.$row, '=TIMEVALUE(A'.$row.')');
42
-	$worksheet->setCellValue('C'.$row, '=B'.$row);
39
+for ($row = 1; $row <= $testDateCount; ++$row) {
40
+	$worksheet->setCellValue('A' . $row, $testDates[$row - 1]);
41
+	$worksheet->setCellValue('B' . $row, '=TIMEVALUE(A' . $row . ')');
42
+	$worksheet->setCellValue('C' . $row, '=B' . $row);
43 43
 }
44 44
 
45
-$worksheet->getStyle('C1:C'.$testDateCount)
45
+$worksheet->getStyle('C1:C' . $testDateCount)
46 46
           ->getNumberFormat()
47 47
           ->setFormatCode('hh:mm:ss');
48 48
 
@@ -62,10 +62,10 @@  discard block
 block discarded – undo
62 62
 	<?php
63 63
 	for ($row = 1; $row <= $testDateCount; ++$row) {
64 64
 		echo '<tr>';
65
-		    echo '<td>' , $worksheet->getCell('A'.$row)->getFormattedValue() , '</td>';
66
-			echo '<td>' , $worksheet->getCell('B'.$row)->getValue() , '</td>';
67
-			echo '<td>' , $worksheet->getCell('B'.$row)->getFormattedValue() , '</td>';
68
-			echo '<td>' , $worksheet->getCell('C'.$row)->getFormattedValue() , '</td>';
65
+		    echo '<td>', $worksheet->getCell('A' . $row)->getFormattedValue(), '</td>';
66
+			echo '<td>', $worksheet->getCell('B' . $row)->getValue(), '</td>';
67
+			echo '<td>', $worksheet->getCell('B' . $row)->getFormattedValue(), '</td>';
68
+			echo '<td>', $worksheet->getCell('C' . $row)->getFormattedValue(), '</td>';
69 69
 		echo '</tr>';
70 70
 	}
71 71
 	?>
Please login to merge, or discard this patch.