Completed
Push — develop ( 942ad7...b0621f )
by Adrien
22:01 queued 09:22
created
Examples/39dropdown.php 1 patch
Indentation   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -45,12 +45,12 @@
 block discarded – undo
45 45
 echo date('H:i:s') , " Set document properties" , EOL;
46 46
 $objPHPExcel->getProperties()
47 47
     ->setCreator("PHPOffice")
48
-	->setLastModifiedBy("PHPOffice")
49
-	->setTitle("PHPExcel Test Document")
50
-	->setSubject("PHPExcel Test Document")
51
-	->setDescription("Test document for PHPExcel, generated using PHP classes.")
52
-	->setKeywords("Office PHPExcel php")
53
-	->setCategory("Test result file");
48
+    ->setLastModifiedBy("PHPOffice")
49
+    ->setTitle("PHPExcel Test Document")
50
+    ->setSubject("PHPExcel Test Document")
51
+    ->setDescription("Test document for PHPExcel, generated using PHP classes.")
52
+    ->setKeywords("Office PHPExcel php")
53
+    ->setCategory("Test result file");
54 54
 
55 55
 
56 56
 function transpose($value) {
Please login to merge, or discard this patch.
Examples/Quadratic.php 1 patch
Indentation   +21 added lines, -21 removed lines patch added patch discarded remove patch
@@ -33,33 +33,33 @@
 block discarded – undo
33 33
 <?php
34 34
 /**	If the user has submitted the form, then we need to execute a calculation **/
35 35
 if (isset($_POST['submit'])) {
36
-	if ($_POST['A'] == 0) {
37
-		echo 'The equation is not quadratic';
38
-	} else {
39
-		/**	So we include PHPExcel to perform the calculations	**/
40
-		include 'PHPExcel/IOFactory.php';
36
+    if ($_POST['A'] == 0) {
37
+        echo 'The equation is not quadratic';
38
+    } else {
39
+        /**	So we include PHPExcel to perform the calculations	**/
40
+        include 'PHPExcel/IOFactory.php';
41 41
 
42
-		/**	Load the quadratic equation solver worksheet into memory			**/
43
-		$objPHPExcel = \PHPExcel\IOFactory::load('./Quadratic.xlsx');
42
+        /**	Load the quadratic equation solver worksheet into memory			**/
43
+        $objPHPExcel = \PHPExcel\IOFactory::load('./Quadratic.xlsx');
44 44
 
45
-		/**	Set our A, B and C values			**/
46
-		$objPHPExcel->getActiveSheet()->setCellValue('A1', $_POST['A']);
47
-		$objPHPExcel->getActiveSheet()->setCellValue('B1', $_POST['B']);
48
-		$objPHPExcel->getActiveSheet()->setCellValue('C1', $_POST['C']);
45
+        /**	Set our A, B and C values			**/
46
+        $objPHPExcel->getActiveSheet()->setCellValue('A1', $_POST['A']);
47
+        $objPHPExcel->getActiveSheet()->setCellValue('B1', $_POST['B']);
48
+        $objPHPExcel->getActiveSheet()->setCellValue('C1', $_POST['C']);
49 49
 
50 50
 
51
-		/**	Calculate and Display the results			**/
52
-		echo '<hr /><b>Roots:</b><br />';
51
+        /**	Calculate and Display the results			**/
52
+        echo '<hr /><b>Roots:</b><br />';
53 53
 
54
-		$callStartTime = microtime(true);
55
-		echo $objPHPExcel->getActiveSheet()->getCell('B5')->getCalculatedValue().'<br />';
56
-		echo $objPHPExcel->getActiveSheet()->getCell('B6')->getCalculatedValue().'<br />';
57
-		$callEndTime = microtime(true);
58
-		$callTime = $callEndTime - $callStartTime;
54
+        $callStartTime = microtime(true);
55
+        echo $objPHPExcel->getActiveSheet()->getCell('B5')->getCalculatedValue().'<br />';
56
+        echo $objPHPExcel->getActiveSheet()->getCell('B6')->getCalculatedValue().'<br />';
57
+        $callEndTime = microtime(true);
58
+        $callTime = $callEndTime - $callStartTime;
59 59
 
60
-		echo '<hr />Call time for Quadratic Equation Solution was '.sprintf('%.4f',$callTime).' seconds<br /><hr />';
61
-		echo ' Peak memory usage: '.(memory_get_peak_usage(true) / 1024 / 1024).' MB<br />';
62
-	}
60
+        echo '<hr />Call time for Quadratic Equation Solution was '.sprintf('%.4f',$callTime).' seconds<br /><hr />';
61
+        echo ' Peak memory usage: '.(memory_get_peak_usage(true) / 1024 / 1024).' MB<br />';
62
+    }
63 63
 }
64 64
 
65 65
 ?>
Please login to merge, or discard this patch.
Examples/07reader.php 1 patch
Indentation   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -38,7 +38,7 @@
 block discarded – undo
38 38
 
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;
Please login to merge, or discard this patch.
Examples/34chartupdate.php 1 patch
Indentation   +9 added lines, -9 removed lines patch added patch discarded remove patch
@@ -40,7 +40,7 @@  discard block
 block discarded – undo
40 40
 require_once dirname(__FILE__) . '/../src/Bootstrap.php';
41 41
 
42 42
 if (!file_exists("33chartcreate-bar.xlsx")) {
43
-	exit("Please run 33chartcreate-bar.php first." . EOL);
43
+    exit("Please run 33chartcreate-bar.php first." . EOL);
44 44
 }
45 45
 
46 46
 echo date('H:i:s') , " Load from Excel2007 file" , EOL;
@@ -52,14 +52,14 @@  discard block
 block discarded – undo
52 52
 echo date('H:i:s') , " Update cell data values that are displayed in the chart" , EOL;
53 53
 $objWorksheet = $objPHPExcel->getActiveSheet();
54 54
 $objWorksheet->fromArray(
55
-	array(
56
-		array(50-12,   50-15,		50-21),
57
-		array(50-56,   50-73,		50-86),
58
-		array(50-52,   50-61,		50-69),
59
-		array(50-30,   50-32,		50),
60
-	),
61
-	NULL,
62
-	'B2'
55
+    array(
56
+        array(50-12,   50-15,		50-21),
57
+        array(50-56,   50-73,		50-86),
58
+        array(50-52,   50-61,		50-69),
59
+        array(50-30,   50-32,		50),
60
+    ),
61
+    NULL,
62
+    'B2'
63 63
 );
64 64
 
65 65
 // Save Excel 2007 file
Please login to merge, or discard this patch.
Examples/33chartcreate-stock.php 1 patch
Indentation   +32 added lines, -32 removed lines patch added patch discarded remove patch
@@ -43,14 +43,14 @@  discard block
 block discarded – undo
43 43
 $objPHPExcel = new \PHPExcel\Spreadsheet();
44 44
 $objWorksheet = $objPHPExcel->getActiveSheet();
45 45
 $objWorksheet->fromArray(
46
-	array(
47
-		array('Counts', 		'Max', 		'Min', 		'Min Threshold', 	'Max Threshold'	),
48
-		array(10,		 		10, 		5, 			0, 					50				),
49
-		array(30,		 		20, 		10, 		0,	 				50				),
50
-		array(20,		 		30, 		15, 		0,	 				50				),
51
-		array(40,		 		10, 		0, 			0, 					50				),
52
-		array(100,		 		40, 		5, 			0, 					50				),
53
-	), null, 'A1', true
46
+    array(
47
+        array('Counts', 		'Max', 		'Min', 		'Min Threshold', 	'Max Threshold'	),
48
+        array(10,		 		10, 		5, 			0, 					50				),
49
+        array(30,		 		20, 		10, 		0,	 				50				),
50
+        array(20,		 		30, 		15, 		0,	 				50				),
51
+        array(40,		 		10, 		0, 			0, 					50				),
52
+        array(100,		 		40, 		5, 			0, 					50				),
53
+    ), null, 'A1', true
54 54
 );
55 55
 $objWorksheet->getStyle('B2:E6')->getNumberFormat()->setFormatCode(PHPExcel\Style\NumberFormat::FORMAT_NUMBER_00);
56 56
 
@@ -63,10 +63,10 @@  discard block
 block discarded – undo
63 63
 //		Data values
64 64
 //		Data Marker
65 65
 $dataSeriesLabels = array(
66
-	new \PHPExcel\Chart\DataSeriesValues('String', 'Worksheet!$B$1', NULL, 1), //Max / Open
67
-	new \PHPExcel\Chart\DataSeriesValues('String', 'Worksheet!$C$1', NULL, 1), //Min / Close
68
-	new \PHPExcel\Chart\DataSeriesValues('String', 'Worksheet!$D$1', NULL, 1), //Min Threshold / Min
69
-	new \PHPExcel\Chart\DataSeriesValues('String', 'Worksheet!$E$1', NULL, 1), //Max Threshold / Max
66
+    new \PHPExcel\Chart\DataSeriesValues('String', 'Worksheet!$B$1', NULL, 1), //Max / Open
67
+    new \PHPExcel\Chart\DataSeriesValues('String', 'Worksheet!$C$1', NULL, 1), //Min / Close
68
+    new \PHPExcel\Chart\DataSeriesValues('String', 'Worksheet!$D$1', NULL, 1), //Min Threshold / Min
69
+    new \PHPExcel\Chart\DataSeriesValues('String', 'Worksheet!$E$1', NULL, 1), //Max Threshold / Max
70 70
 );
71 71
 //	Set the X-Axis Labels
72 72
 //		Datatype
@@ -76,7 +76,7 @@  discard block
 block discarded – undo
76 76
 //		Data values
77 77
 //		Data Marker
78 78
 $xAxisTickValues = array(
79
-	new \PHPExcel\Chart\DataSeriesValues('String', 'Worksheet!$A$2:$A$6', NULL, 5),	//	Counts
79
+    new \PHPExcel\Chart\DataSeriesValues('String', 'Worksheet!$A$2:$A$6', NULL, 5),	//	Counts
80 80
 );
81 81
 //	Set the Data values for each data series we want to plot
82 82
 //		Datatype
@@ -86,20 +86,20 @@  discard block
 block discarded – undo
86 86
 //		Data values
87 87
 //		Data Marker
88 88
 $dataSeriesValues = array(
89
-	new \PHPExcel\Chart\DataSeriesValues('Number', 'Worksheet!$B$2:$B$6', NULL, 5),
90
-	new \PHPExcel\Chart\DataSeriesValues('Number', 'Worksheet!$C$2:$C$6', NULL, 5),
91
-	new \PHPExcel\Chart\DataSeriesValues('Number', 'Worksheet!$D$2:$D$6', NULL, 5),
92
-	new \PHPExcel\Chart\DataSeriesValues('Number', 'Worksheet!$E$2:$E$6', NULL, 5),
89
+    new \PHPExcel\Chart\DataSeriesValues('Number', 'Worksheet!$B$2:$B$6', NULL, 5),
90
+    new \PHPExcel\Chart\DataSeriesValues('Number', 'Worksheet!$C$2:$C$6', NULL, 5),
91
+    new \PHPExcel\Chart\DataSeriesValues('Number', 'Worksheet!$D$2:$D$6', NULL, 5),
92
+    new \PHPExcel\Chart\DataSeriesValues('Number', 'Worksheet!$E$2:$E$6', NULL, 5),
93 93
 );
94 94
 
95 95
 //	Build the dataseries
96 96
 $series = new \PHPExcel\Chart\DataSeries(
97
-	\PHPExcel\Chart\DataSeries::TYPE_STOCKCHART,	// plotType
98
-	null,										// plotGrouping - if we set this to not null, then xlsx throws error
99
-	range(0, count($dataSeriesValues)-1),		// plotOrder
100
-	$dataSeriesLabels,							// plotLabel
101
-	$xAxisTickValues,							// plotCategory
102
-	$dataSeriesValues							// plotValues
97
+    \PHPExcel\Chart\DataSeries::TYPE_STOCKCHART,	// plotType
98
+    null,										// plotGrouping - if we set this to not null, then xlsx throws error
99
+    range(0, count($dataSeriesValues)-1),		// plotOrder
100
+    $dataSeriesLabels,							// plotLabel
101
+    $xAxisTickValues,							// plotCategory
102
+    $dataSeriesValues							// plotValues
103 103
 );
104 104
 
105 105
 //	Set the series in the plot area
@@ -113,14 +113,14 @@  discard block
 block discarded – undo
113 113
 
114 114
 //	Create the chart
115 115
 $chart = new \PHPExcel\Chart(
116
-	'stock-chart',	// name
117
-	$title,			// title
118
-	$legend,		// legend
119
-	$plotArea,		// plotArea
120
-	true,			// plotVisibleOnly
121
-	0,				// displayBlanksAs
122
-	$xAxisLabel,	// xAxisLabel
123
-	$yAxisLabel		// yAxisLabel
116
+    'stock-chart',	// name
117
+    $title,			// title
118
+    $legend,		// legend
119
+    $plotArea,		// plotArea
120
+    true,			// plotVisibleOnly
121
+    0,				// displayBlanksAs
122
+    $xAxisLabel,	// xAxisLabel
123
+    $yAxisLabel		// yAxisLabel
124 124
 );
125 125
 
126 126
 //	Set the position where the chart should appear in the worksheet
@@ -137,7 +137,7 @@  discard block
 block discarded – undo
137 137
 $objWriter->setIncludeCharts(TRUE);
138 138
 $filename = str_replace('.php', '.xlsx', __FILE__);
139 139
 if(file_exists($filename)) {
140
-	unlink($filename);
140
+    unlink($filename);
141 141
 }
142 142
 $objWriter->save($filename);
143 143
 echo date('H:i:s') , " File written to " , str_replace('.php', '.xlsx', pathinfo(__FILE__, PATHINFO_BASENAME)) , EOL;
Please login to merge, or discard this patch.
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/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.