Completed
Push — develop ( 467bab...e1f81f )
by Adrien
10:03
created
Examples/19namedrange.php 1 patch
Indentation   +16 added lines, -16 removed lines patch added patch discarded remove patch
@@ -46,23 +46,23 @@  discard block
 block discarded – undo
46 46
 // Set document properties
47 47
 echo date('H:i:s') , " Set document properties" , EOL;
48 48
 $objPHPExcel->getProperties()->setCreator("Maarten Balliauw")
49
-							 ->setLastModifiedBy("Maarten Balliauw")
50
-							 ->setTitle("Office 2007 XLSX Test Document")
51
-							 ->setSubject("Office 2007 XLSX Test Document")
52
-							 ->setDescription("Test document for Office 2007 XLSX, generated using PHP classes.")
53
-							 ->setKeywords("office 2007 openxml php")
54
-							 ->setCategory("Test result file");
49
+                                ->setLastModifiedBy("Maarten Balliauw")
50
+                                ->setTitle("Office 2007 XLSX Test Document")
51
+                                ->setSubject("Office 2007 XLSX Test Document")
52
+                                ->setDescription("Test document for Office 2007 XLSX, generated using PHP classes.")
53
+                                ->setKeywords("office 2007 openxml php")
54
+                                ->setCategory("Test result file");
55 55
 
56 56
 
57 57
 // Add some data
58 58
 echo date('H:i:s') , " Add some data" , EOL;
59 59
 $objPHPExcel->setActiveSheetIndex(0);
60 60
 $objPHPExcel->getActiveSheet()->setCellValue('A1', 'Firstname:')
61
-                              ->setCellValue('A2', 'Lastname:')
62
-                              ->setCellValue('A3', 'Fullname:')
63
-                              ->setCellValue('B1', 'Maarten')
64
-                              ->setCellValue('B2', 'Balliauw')
65
-                              ->setCellValue('B3', '=B1 & " " & B2');
61
+                                ->setCellValue('A2', 'Lastname:')
62
+                                ->setCellValue('A3', 'Fullname:')
63
+                                ->setCellValue('B1', 'Maarten')
64
+                                ->setCellValue('B2', 'Balliauw')
65
+                                ->setCellValue('B3', '=B1 & " " & B2');
66 66
 
67 67
 // Define named ranges
68 68
 echo date('H:i:s') , " Define named ranges" , EOL;
@@ -86,11 +86,11 @@  discard block
 block discarded – undo
86 86
 echo date('H:i:s') , " Add some data" , EOL;
87 87
 $objPHPExcel->setActiveSheetIndex(1);
88 88
 $objPHPExcel->getActiveSheet()->setCellValue('A1', 'Firstname:')
89
-                              ->setCellValue('A2', 'Lastname:')
90
-                              ->setCellValue('A3', 'Fullname:')
91
-                              ->setCellValue('B1', '=PersonFN')
92
-                              ->setCellValue('B2', '=PersonLN')
93
-                              ->setCellValue('B3', '=PersonFN & " " & PersonLN');
89
+                                ->setCellValue('A2', 'Lastname:')
90
+                                ->setCellValue('A3', 'Fullname:')
91
+                                ->setCellValue('B1', '=PersonFN')
92
+                                ->setCellValue('B2', '=PersonLN')
93
+                                ->setCellValue('B3', '=PersonFN & " " & PersonLN');
94 94
 
95 95
 // Resolve range
96 96
 echo date('H:i:s') , " Resolve range" , EOL;
Please login to merge, or discard this patch.
Examples/10autofilter.php 1 patch
Indentation   +65 added lines, -65 removed lines patch added patch discarded remove patch
@@ -44,78 +44,78 @@
 block discarded – undo
44 44
 // Set document properties
45 45
 echo date('H:i:s').' Set document properties'.EOL;
46 46
 $objPHPExcel->getProperties()->setCreator('Maarten Balliauw')
47
-							 ->setLastModifiedBy('Maarten Balliauw')
48
-							 ->setTitle('PHPExcel Test Document')
49
-							 ->setSubject('PHPExcel Test Document')
50
-							 ->setDescription('Test document for PHPExcel, generated using PHP classes.')
51
-							 ->setKeywords('office PHPExcel php')
52
-							 ->setCategory('Test result file');
47
+                                ->setLastModifiedBy('Maarten Balliauw')
48
+                                ->setTitle('PHPExcel Test Document')
49
+                                ->setSubject('PHPExcel Test Document')
50
+                                ->setDescription('Test document for PHPExcel, generated using PHP classes.')
51
+                                ->setKeywords('office PHPExcel php')
52
+                                ->setCategory('Test result file');
53 53
 
54 54
 // Create the worksheet
55 55
 echo date('H:i:s').' Add data'.EOL;
56 56
 $objPHPExcel->setActiveSheetIndex(0);
57 57
 $objPHPExcel->getActiveSheet()->setCellValue('A1', 'Year')
58
-                              ->setCellValue('B1', 'Quarter')
59
-                              ->setCellValue('C1', 'Country')
60
-                              ->setCellValue('D1', 'Sales');
58
+                                ->setCellValue('B1', 'Quarter')
59
+                                ->setCellValue('C1', 'Country')
60
+                                ->setCellValue('D1', 'Sales');
61 61
 
62 62
 $dataArray = array(array('2010',	'Q1',	'United States',	790),
63
-                   array('2010',	'Q2',	'United States',	730),
64
-                   array('2010',	'Q3',	'United States',	860),
65
-                   array('2010',	'Q4',	'United States',	850),
66
-                   array('2011',	'Q1',	'United States',	800),
67
-                   array('2011',	'Q2',	'United States',	700),
68
-                   array('2011',	'Q3',	'United States',	900),
69
-                   array('2011',	'Q4',	'United States',	950),
70
-                   array('2010',	'Q1',	'Belgium',			380),
71
-                   array('2010',	'Q2',	'Belgium',			390),
72
-                   array('2010',	'Q3',	'Belgium',			420),
73
-                   array('2010',	'Q4',	'Belgium',			460),
74
-                   array('2011',	'Q1',	'Belgium',			400),
75
-                   array('2011',	'Q2',	'Belgium',			350),
76
-                   array('2011',	'Q3',	'Belgium',			450),
77
-                   array('2011',	'Q4',	'Belgium',			500),
78
-                   array('2010',	'Q1',	'UK',				690),
79
-                   array('2010',	'Q2',	'UK',				610),
80
-                   array('2010',	'Q3',	'UK',				620),
81
-                   array('2010',	'Q4',	'UK',				600),
82
-                   array('2011',	'Q1',	'UK',				720),
83
-                   array('2011',	'Q2',	'UK',				650),
84
-                   array('2011',	'Q3',	'UK',				580),
85
-                   array('2011',	'Q4',	'UK',				510),
86
-                   array('2010',	'Q1',	'France',			510),
87
-                   array('2010',	'Q2',	'France',			490),
88
-                   array('2010',	'Q3',	'France',			460),
89
-                   array('2010',	'Q4',	'France', 			590),
90
-                   array('2011',	'Q1',	'France',			620),
91
-                   array('2011',	'Q2',	'France',			650),
92
-                   array('2011',	'Q3',	'France',			415),
93
-                   array('2011',	'Q4',	'France', 			570),
94
-                   array('2010',	'Q1',	'Germany',			720),
95
-                   array('2010',	'Q2',	'Germany',			680),
96
-                   array('2010',	'Q3',	'Germany',			640),
97
-                   array('2010',	'Q4',	'Germany',			660),
98
-                   array('2011',	'Q1',	'Germany',			680),
99
-                   array('2011',	'Q2',	'Germany',			620),
100
-                   array('2011',	'Q3',	'Germany',			710),
101
-                   array('2011',	'Q4',	'Germany',			690),
102
-                   array('2010',	'Q1',	'Spain',			510),
103
-                   array('2010',	'Q2',	'Spain',			490),
104
-                   array('2010',	'Q3',	'Spain',			470),
105
-                   array('2010',	'Q4',	'Spain',			420),
106
-                   array('2011',	'Q1',	'Spain',			460),
107
-                   array('2011',	'Q2',	'Spain',			390),
108
-                   array('2011',	'Q3',	'Spain',			430),
109
-                   array('2011',	'Q4',	'Spain',			415),
110
-                   array('2010',	'Q1',	'Italy',			440),
111
-                   array('2010',	'Q2',	'Italy',			410),
112
-                   array('2010',	'Q3',	'Italy',			420),
113
-                   array('2010',	'Q4',	'Italy',			450),
114
-                   array('2011',	'Q1',	'Italy',			430),
115
-                   array('2011',	'Q2',	'Italy',			370),
116
-                   array('2011',	'Q3',	'Italy',			350),
117
-                   array('2011',	'Q4',	'Italy',			335),
118
-                  );
63
+                    array('2010',	'Q2',	'United States',	730),
64
+                    array('2010',	'Q3',	'United States',	860),
65
+                    array('2010',	'Q4',	'United States',	850),
66
+                    array('2011',	'Q1',	'United States',	800),
67
+                    array('2011',	'Q2',	'United States',	700),
68
+                    array('2011',	'Q3',	'United States',	900),
69
+                    array('2011',	'Q4',	'United States',	950),
70
+                    array('2010',	'Q1',	'Belgium',			380),
71
+                    array('2010',	'Q2',	'Belgium',			390),
72
+                    array('2010',	'Q3',	'Belgium',			420),
73
+                    array('2010',	'Q4',	'Belgium',			460),
74
+                    array('2011',	'Q1',	'Belgium',			400),
75
+                    array('2011',	'Q2',	'Belgium',			350),
76
+                    array('2011',	'Q3',	'Belgium',			450),
77
+                    array('2011',	'Q4',	'Belgium',			500),
78
+                    array('2010',	'Q1',	'UK',				690),
79
+                    array('2010',	'Q2',	'UK',				610),
80
+                    array('2010',	'Q3',	'UK',				620),
81
+                    array('2010',	'Q4',	'UK',				600),
82
+                    array('2011',	'Q1',	'UK',				720),
83
+                    array('2011',	'Q2',	'UK',				650),
84
+                    array('2011',	'Q3',	'UK',				580),
85
+                    array('2011',	'Q4',	'UK',				510),
86
+                    array('2010',	'Q1',	'France',			510),
87
+                    array('2010',	'Q2',	'France',			490),
88
+                    array('2010',	'Q3',	'France',			460),
89
+                    array('2010',	'Q4',	'France', 			590),
90
+                    array('2011',	'Q1',	'France',			620),
91
+                    array('2011',	'Q2',	'France',			650),
92
+                    array('2011',	'Q3',	'France',			415),
93
+                    array('2011',	'Q4',	'France', 			570),
94
+                    array('2010',	'Q1',	'Germany',			720),
95
+                    array('2010',	'Q2',	'Germany',			680),
96
+                    array('2010',	'Q3',	'Germany',			640),
97
+                    array('2010',	'Q4',	'Germany',			660),
98
+                    array('2011',	'Q1',	'Germany',			680),
99
+                    array('2011',	'Q2',	'Germany',			620),
100
+                    array('2011',	'Q3',	'Germany',			710),
101
+                    array('2011',	'Q4',	'Germany',			690),
102
+                    array('2010',	'Q1',	'Spain',			510),
103
+                    array('2010',	'Q2',	'Spain',			490),
104
+                    array('2010',	'Q3',	'Spain',			470),
105
+                    array('2010',	'Q4',	'Spain',			420),
106
+                    array('2011',	'Q1',	'Spain',			460),
107
+                    array('2011',	'Q2',	'Spain',			390),
108
+                    array('2011',	'Q3',	'Spain',			430),
109
+                    array('2011',	'Q4',	'Spain',			415),
110
+                    array('2010',	'Q1',	'Italy',			440),
111
+                    array('2010',	'Q2',	'Italy',			410),
112
+                    array('2010',	'Q3',	'Italy',			420),
113
+                    array('2010',	'Q4',	'Italy',			450),
114
+                    array('2011',	'Q1',	'Italy',			430),
115
+                    array('2011',	'Q2',	'Italy',			370),
116
+                    array('2011',	'Q3',	'Italy',			350),
117
+                    array('2011',	'Q4',	'Italy',			335),
118
+                    );
119 119
 $objPHPExcel->getActiveSheet()->fromArray($dataArray, NULL, 'A2');
120 120
 
121 121
 // Set title row bold
Please login to merge, or discard this patch.
Examples/28iterator.php 1 patch
Indentation   +12 added lines, -12 removed lines patch added patch discarded remove patch
@@ -38,7 +38,7 @@  discard block
 block discarded – undo
38 38
 require_once dirname(__FILE__) . '/../src/Bootstrap.php';
39 39
 
40 40
 if (!file_exists("05featuredemo.xlsx")) {
41
-	exit("Please run 05featuredemo.php first." . EOL);
41
+    exit("Please run 05featuredemo.php first." . EOL);
42 42
 }
43 43
 
44 44
 echo date('H:i:s') , " Load from Excel2007 file" , EOL;
@@ -47,19 +47,19 @@  discard block
 block discarded – undo
47 47
 
48 48
 echo date('H:i:s') , " Iterate worksheets" , EOL;
49 49
 foreach ($objPHPExcel->getWorksheetIterator() as $worksheet) {
50
-	echo 'Worksheet - ' , $worksheet->getTitle() , EOL;
50
+    echo 'Worksheet - ' , $worksheet->getTitle() , EOL;
51 51
 
52
-	foreach ($worksheet->getRowIterator() as $row) {
53
-		echo '    Row number - ' , $row->getRowIndex() , EOL;
52
+    foreach ($worksheet->getRowIterator() as $row) {
53
+        echo '    Row number - ' , $row->getRowIndex() , EOL;
54 54
 
55
-		$cellIterator = $row->getCellIterator();
56
-		$cellIterator->setIterateOnlyExistingCells(false); // Loop all cells, even if it is not set
57
-		foreach ($cellIterator as $cell) {
58
-			if (!is_null($cell)) {
59
-				echo '        Cell - ' , $cell->getCoordinate() , ' - ' , $cell->getCalculatedValue() , EOL;
60
-			}
61
-		}
62
-	}
55
+        $cellIterator = $row->getCellIterator();
56
+        $cellIterator->setIterateOnlyExistingCells(false); // Loop all cells, even if it is not set
57
+        foreach ($cellIterator as $cell) {
58
+            if (!is_null($cell)) {
59
+                echo '        Cell - ' , $cell->getCoordinate() , ' - ' , $cell->getCalculatedValue() , EOL;
60
+            }
61
+        }
62
+    }
63 63
 }
64 64
 
65 65
 
Please login to merge, or discard this patch.
Examples/03formulas.php 1 patch
Indentation   +20 added lines, -20 removed lines patch added patch discarded remove patch
@@ -44,12 +44,12 @@  discard block
 block discarded – undo
44 44
 // Set document properties
45 45
 echo date('H:i:s') , " Set document properties" , EOL;
46 46
 $objPHPExcel->getProperties()->setCreator("Maarten Balliauw")
47
-							 ->setLastModifiedBy("Maarten Balliauw")
48
-							 ->setTitle("Office 2007 XLSX Test Document")
49
-							 ->setSubject("Office 2007 XLSX Test Document")
50
-							 ->setDescription("Test document for Office 2007 XLSX, generated using PHP classes.")
51
-							 ->setKeywords("office 2007 openxml php")
52
-							 ->setCategory("Test result file");
47
+                                ->setLastModifiedBy("Maarten Balliauw")
48
+                                ->setTitle("Office 2007 XLSX Test Document")
49
+                                ->setSubject("Office 2007 XLSX Test Document")
50
+                                ->setDescription("Test document for Office 2007 XLSX, generated using PHP classes.")
51
+                                ->setKeywords("office 2007 openxml php")
52
+                                ->setCategory("Test result file");
53 53
 
54 54
 
55 55
 // Add some data, we will use some formulas here
@@ -57,40 +57,40 @@  discard block
 block discarded – undo
57 57
 $objPHPExcel->getActiveSheet()->setCellValue('A5', 'Sum:');
58 58
 
59 59
 $objPHPExcel->getActiveSheet()->setCellValue('B1', 'Range #1')
60
-                              ->setCellValue('B2', 3)
61
-                              ->setCellValue('B3', 7)
62
-                              ->setCellValue('B4', 13)
63
-                              ->setCellValue('B5', '=SUM(B2:B4)');
60
+                                ->setCellValue('B2', 3)
61
+                                ->setCellValue('B3', 7)
62
+                                ->setCellValue('B4', 13)
63
+                                ->setCellValue('B5', '=SUM(B2:B4)');
64 64
 echo date('H:i:s') , " Sum of Range #1 is " ,
65
-                     $objPHPExcel->getActiveSheet()->getCell('B5')->getCalculatedValue() , EOL;
65
+                        $objPHPExcel->getActiveSheet()->getCell('B5')->getCalculatedValue() , EOL;
66 66
 
67 67
 $objPHPExcel->getActiveSheet()->setCellValue('C1', 'Range #2')
68
-                              ->setCellValue('C2', 5)
69
-                              ->setCellValue('C3', 11)
70
-                              ->setCellValue('C4', 17)
71
-                              ->setCellValue('C5', '=SUM(C2:C4)');
68
+                                ->setCellValue('C2', 5)
69
+                                ->setCellValue('C3', 11)
70
+                                ->setCellValue('C4', 17)
71
+                                ->setCellValue('C5', '=SUM(C2:C4)');
72 72
 echo date('H:i:s') , " Sum of Range #2 is " ,
73
-                     $objPHPExcel->getActiveSheet()->getCell('C5')->getCalculatedValue() , EOL;
73
+                        $objPHPExcel->getActiveSheet()->getCell('C5')->getCalculatedValue() , EOL;
74 74
 
75 75
 $objPHPExcel->getActiveSheet()->setCellValue('A7', 'Total of both ranges:');
76 76
 $objPHPExcel->getActiveSheet()->setCellValue('B7', '=SUM(B5:C5)');
77 77
 echo date('H:i:s') , " Sum of both Ranges is " ,
78
-                     $objPHPExcel->getActiveSheet()->getCell('B7')->getCalculatedValue() , EOL;
78
+                        $objPHPExcel->getActiveSheet()->getCell('B7')->getCalculatedValue() , EOL;
79 79
 
80 80
 $objPHPExcel->getActiveSheet()->setCellValue('A8', 'Minimum of both ranges:');
81 81
 $objPHPExcel->getActiveSheet()->setCellValue('B8', '=MIN(B2:C4)');
82 82
 echo date('H:i:s') , " Minimum value in either Range is " ,
83
-                     $objPHPExcel->getActiveSheet()->getCell('B8')->getCalculatedValue() , EOL;
83
+                        $objPHPExcel->getActiveSheet()->getCell('B8')->getCalculatedValue() , EOL;
84 84
 
85 85
 $objPHPExcel->getActiveSheet()->setCellValue('A9', 'Maximum of both ranges:');
86 86
 $objPHPExcel->getActiveSheet()->setCellValue('B9', '=MAX(B2:C4)');
87 87
 echo date('H:i:s') , " Maximum value in either Range is " ,
88
-                     $objPHPExcel->getActiveSheet()->getCell('B9')->getCalculatedValue() , EOL;
88
+                        $objPHPExcel->getActiveSheet()->getCell('B9')->getCalculatedValue() , EOL;
89 89
 
90 90
 $objPHPExcel->getActiveSheet()->setCellValue('A10', 'Average of both ranges:');
91 91
 $objPHPExcel->getActiveSheet()->setCellValue('B10', '=AVERAGE(B2:C4)');
92 92
 echo date('H:i:s') , " Average value of both Ranges is " ,
93
-                     $objPHPExcel->getActiveSheet()->getCell('B10')->getCalculatedValue() , EOL;
93
+                        $objPHPExcel->getActiveSheet()->getCell('B10')->getCalculatedValue() , EOL;
94 94
 
95 95
 
96 96
 // Rename worksheet
Please login to merge, or discard this patch.
Examples/31docproperties_write-xls.php 1 patch
Indentation   +15 added lines, -15 removed lines patch added patch discarded remove patch
@@ -57,9 +57,9 @@  discard block
 block discarded – undo
57 57
 
58 58
 echo date('H:i:s') , " Adjust properties" , EOL;
59 59
 $objPHPExcel->getProperties()->setTitle("Office 95 XLS Test Document")
60
-							 ->setSubject("Office 95 XLS Test Document")
61
-							 ->setDescription("Test XLS document, generated using PHPExcel")
62
-							 ->setKeywords("office 95 biff php");
60
+                                ->setSubject("Office 95 XLS Test Document")
61
+                                ->setDescription("Test XLS document, generated using PHPExcel")
62
+                                ->setKeywords("office 95 biff php");
63 63
 
64 64
 
65 65
 // Save Excel 95 file
@@ -84,10 +84,10 @@  discard block
 block discarded – undo
84 84
 echo 'Core Properties:' , EOL;
85 85
 echo '    Created by - ' , $objPHPExcel->getProperties()->getCreator() , EOL;
86 86
 echo '    Created on - ' , date('d-M-Y',$objPHPExcel->getProperties()->getCreated()) , ' at ' ,
87
-                       date('H:i:s',$objPHPExcel->getProperties()->getCreated()) , EOL;
87
+                        date('H:i:s',$objPHPExcel->getProperties()->getCreated()) , EOL;
88 88
 echo '    Last Modified by - ' , $objPHPExcel->getProperties()->getLastModifiedBy() , EOL;
89 89
 echo '    Last Modified on - ' , date('d-M-Y',$objPHPExcel->getProperties()->getModified()) , ' at ' ,
90
-                             date('H:i:s',$objPHPExcel->getProperties()->getModified()) , EOL;
90
+                                date('H:i:s',$objPHPExcel->getProperties()->getModified()) , EOL;
91 91
 echo '    Title - ' , $objPHPExcel->getProperties()->getTitle() , EOL;
92 92
 echo '    Subject - ' , $objPHPExcel->getProperties()->getSubject() , EOL;
93 93
 echo '    Description - ' , $objPHPExcel->getProperties()->getDescription() , EOL;
@@ -103,16 +103,16 @@  discard block
 block discarded – undo
103 103
 echo 'Custom Properties:' , EOL;
104 104
 $customProperties = $objPHPExcel->getProperties()->getCustomProperties();
105 105
 foreach($customProperties as $customProperty) {
106
-	$propertyValue = $objPHPExcel->getProperties()->getCustomPropertyValue($customProperty);
107
-	$propertyType = $objPHPExcel->getProperties()->getCustomPropertyType($customProperty);
108
-	echo '    ' , $customProperty , ' - (' , $propertyType , ') - ';
109
-	if ($propertyType == \PHPExcel\Document\Properties::PROPERTY_TYPE_DATE) {
110
-		echo date('d-M-Y H:i:s',$propertyValue) , EOL;
111
-	} elseif ($propertyType == \PHPExcel\Document\Properties::PROPERTY_TYPE_BOOLEAN) {
112
-		echo (($propertyValue) ? 'TRUE' : 'FALSE') , EOL;
113
-	} else {
114
-		echo $propertyValue , EOL;
115
-	}
106
+    $propertyValue = $objPHPExcel->getProperties()->getCustomPropertyValue($customProperty);
107
+    $propertyType = $objPHPExcel->getProperties()->getCustomPropertyType($customProperty);
108
+    echo '    ' , $customProperty , ' - (' , $propertyType , ') - ';
109
+    if ($propertyType == \PHPExcel\Document\Properties::PROPERTY_TYPE_DATE) {
110
+        echo date('d-M-Y H:i:s',$propertyValue) , EOL;
111
+    } elseif ($propertyType == \PHPExcel\Document\Properties::PROPERTY_TYPE_BOOLEAN) {
112
+        echo (($propertyValue) ? 'TRUE' : 'FALSE') , EOL;
113
+    } else {
114
+        echo $propertyValue , EOL;
115
+    }
116 116
 }
117 117
 
118 118
 // Echo memory peak usage
Please login to merge, or discard this patch.
Examples/24readfilter.php 1 patch
Indentation   +8 added lines, -8 removed lines patch added patch discarded remove patch
@@ -39,19 +39,19 @@
 block discarded – undo
39 39
 
40 40
 // Check prerequisites
41 41
 if (!file_exists("06largescale.xlsx")) {
42
-	exit("Please run 06largescale.php first.\n");
42
+    exit("Please run 06largescale.php first.\n");
43 43
 }
44 44
 
45 45
 class MyReadFilter implements \PHPExcel\Reader\IReadFilter
46 46
 {
47
-	public function readCell($column, $row, $worksheetName = '') {
48
-		// Read title row and rows 20 - 30
49
-		if ($row == 1 || ($row >= 20 && $row <= 30)) {
50
-			return true;
51
-		}
47
+    public function readCell($column, $row, $worksheetName = '') {
48
+        // Read title row and rows 20 - 30
49
+        if ($row == 1 || ($row >= 20 && $row <= 30)) {
50
+            return true;
51
+        }
52 52
 
53
-		return false;
54
-	}
53
+        return false;
54
+    }
55 55
 }
56 56
 
57 57
 
Please login to merge, or discard this patch.
Documentation/Examples/Calculations/Database/DSTDEVP.php 1 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/DateTime/DATEVALUE.php 1 patch
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.
Documentation/Examples/Calculations/DateTime/DATE.php 1 patch
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.