@@ -1826,7 +1826,7 @@ discard block |
||
1826 | 1826 | * @access public |
1827 | 1827 | * @category Engineering Functions |
1828 | 1828 | * @param string $complexNumber The complex number for which you want the real coefficient. |
1829 | - * @return float |
|
1829 | + * @return string |
|
1830 | 1830 | */ |
1831 | 1831 | public static function IMREAL($complexNumber) |
1832 | 1832 | { |
@@ -2260,7 +2260,6 @@ discard block |
||
2260 | 2260 | * Excel Function: |
2261 | 2261 | * IMSUM(complexNumber[,complexNumber[,...]]) |
2262 | 2262 | * |
2263 | - * @param string $complexNumber,... Series of complex numbers to add |
|
2264 | 2263 | * @return string |
2265 | 2264 | */ |
2266 | 2265 | public static function IMSUM() |
@@ -2299,7 +2298,6 @@ discard block |
||
2299 | 2298 | * Excel Function: |
2300 | 2299 | * IMPRODUCT(complexNumber[,complexNumber[,...]]) |
2301 | 2300 | * |
2302 | - * @param string $complexNumber,... Series of complex numbers to multiply |
|
2303 | 2301 | * @return string |
2304 | 2302 | */ |
2305 | 2303 | public static function IMPRODUCT() |
@@ -2342,7 +2340,7 @@ discard block |
||
2342 | 2340 | * DELTA(a[,b]) |
2343 | 2341 | * |
2344 | 2342 | * @param float $a The first number. |
2345 | - * @param float $b The second number. If omitted, b is assumed to be zero. |
|
2343 | + * @param integer $b The second number. If omitted, b is assumed to be zero. |
|
2346 | 2344 | * @return int |
2347 | 2345 | */ |
2348 | 2346 | public static function DELTA($a, $b = 0) |
@@ -2365,7 +2363,7 @@ discard block |
||
2365 | 2363 | * functions you calculate the count of values that exceed a threshold. |
2366 | 2364 | * |
2367 | 2365 | * @param float $number The value to test against step. |
2368 | - * @param float $step The threshold value. |
|
2366 | + * @param integer $step The threshold value. |
|
2369 | 2367 | * If you omit a value for step, GESTEP uses zero. |
2370 | 2368 | * @return int |
2371 | 2369 | */ |
@@ -39,7 +39,7 @@ discard block |
||
39 | 39 | * |
40 | 40 | * @param row Row number to use in the cell reference |
41 | 41 | * @param column Column number to use in the cell reference |
42 | - * @param relativity Flag indicating the type of reference to return |
|
42 | + * @param relativity integer indicating the type of reference to return |
|
43 | 43 | * 1 or omitted Absolute |
44 | 44 | * 2 Absolute row; relative column |
45 | 45 | * 3 Relative row; absolute column |
@@ -352,7 +352,7 @@ discard block |
||
352 | 352 | * |
353 | 353 | * @param cellAddress The reference from which you want to base the offset. Reference must refer to a cell or |
354 | 354 | * range of adjacent cells; otherwise, OFFSET returns the #VALUE! error value. |
355 | - * @param rows The number of rows, up or down, that you want the upper-left cell to refer to. |
|
355 | + * @param rows integer number of rows, up or down, that you want the upper-left cell to refer to. |
|
356 | 356 | * Using 5 as the rows argument specifies that the upper-left cell in the reference is |
357 | 357 | * five rows below reference. Rows can be positive (which means below the starting reference) |
358 | 358 | * or negative (which means above the starting reference). |
@@ -490,7 +490,7 @@ discard block |
||
490 | 490 | * |
491 | 491 | * @param lookup_value The value that you want to match in lookup_array |
492 | 492 | * @param lookup_array The range of cells being searched |
493 | - * @param match_type The number -1, 0, or 1. -1 means above, 0 means exact match, 1 means below. If match_type is 1 or -1, the list has to be ordered. |
|
493 | + * @param match_type integer number -1, 0, or 1. -1 means above, 0 means exact match, 1 means below. If match_type is 1 or -1, the list has to be ordered. |
|
494 | 494 | * @return integer The relative position of the found item |
495 | 495 | */ |
496 | 496 | public static function MATCH($lookup_value, $lookup_array, $match_type = 1) |
@@ -680,7 +680,7 @@ discard block |
||
680 | 680 | * The VLOOKUP function searches for value in the left-most column of lookup_array and returns the value in the same row based on the index_number. |
681 | 681 | * @param lookup_value The value that you want to match in lookup_array |
682 | 682 | * @param lookup_array The range of cells being searched |
683 | - * @param index_number The column number in table_array from which the matching value must be returned. The first column is 1. |
|
683 | + * @param index_number integer column number in table_array from which the matching value must be returned. The first column is 1. |
|
684 | 684 | * @param not_exact_match Determines if you are looking for an exact match based on lookup_value. |
685 | 685 | * @return mixed The value of the found cell |
686 | 686 | */ |
@@ -55,6 +55,10 @@ discard block |
||
55 | 55 | } |
56 | 56 | |
57 | 57 | |
58 | + /** |
|
59 | + * @param integer $num |
|
60 | + * @param integer $n |
|
61 | + */ |
|
58 | 62 | private static function romanCut($num, $n) |
59 | 63 | { |
60 | 64 | return ($num - ($num % $n ) ) / $n; |
@@ -337,7 +341,6 @@ discard block |
||
337 | 341 | * |
338 | 342 | * @access public |
339 | 343 | * @category Mathematical and Trigonometric Functions |
340 | - * @param mixed $arg,... Data values |
|
341 | 344 | * @return integer Greatest Common Divisor |
342 | 345 | */ |
343 | 346 | public static function GCD() |
@@ -444,7 +447,6 @@ discard block |
||
444 | 447 | * |
445 | 448 | * @access public |
446 | 449 | * @category Mathematical and Trigonometric Functions |
447 | - * @param mixed $arg,... Data values |
|
448 | 450 | * @return int Lowest Common Multiplier |
449 | 451 | */ |
450 | 452 | public static function LCM() |
@@ -495,7 +497,7 @@ discard block |
||
495 | 497 | * @access public |
496 | 498 | * @category Mathematical and Trigonometric Functions |
497 | 499 | * @param float $number The positive real number for which you want the logarithm |
498 | - * @param float $base The base of the logarithm. If base is omitted, it is assumed to be 10. |
|
500 | + * @param integer $base The base of the logarithm. If base is omitted, it is assumed to be 10. |
|
499 | 501 | * @return float |
500 | 502 | */ |
501 | 503 | public static function logBase($number = null, $base = 10) |
@@ -805,8 +807,8 @@ discard block |
||
805 | 807 | * |
806 | 808 | * Computes x raised to the power y. |
807 | 809 | * |
808 | - * @param float $x |
|
809 | - * @param float $y |
|
810 | + * @param integer $x |
|
811 | + * @param integer $y |
|
810 | 812 | * @return float |
811 | 813 | */ |
812 | 814 | public static function POWER($x = 0, $y = 2) |
@@ -837,7 +839,6 @@ discard block |
||
837 | 839 | * |
838 | 840 | * @access public |
839 | 841 | * @category Mathematical and Trigonometric Functions |
840 | - * @param mixed $arg,... Data values |
|
841 | 842 | * @return float |
842 | 843 | */ |
843 | 844 | public static function PRODUCT() |
@@ -876,8 +877,7 @@ discard block |
||
876 | 877 | * |
877 | 878 | * @access public |
878 | 879 | * @category Mathematical and Trigonometric Functions |
879 | - * @param mixed $arg,... Data values |
|
880 | - * @return float |
|
880 | + * @return integer |
|
881 | 881 | */ |
882 | 882 | public static function QUOTIENT() |
883 | 883 | { |
@@ -1015,9 +1015,6 @@ discard block |
||
1015 | 1015 | * |
1016 | 1016 | * Returns the sum of a power series |
1017 | 1017 | * |
1018 | - * @param float $x Input value to the power series |
|
1019 | - * @param float $n Initial power to which you want to raise $x |
|
1020 | - * @param float $m Step by which to increase $n for each term in the series |
|
1021 | 1018 | * @param array of mixed Data Series |
1022 | 1019 | * @return float |
1023 | 1020 | */ |
@@ -1154,7 +1151,6 @@ discard block |
||
1154 | 1151 | * |
1155 | 1152 | * @access public |
1156 | 1153 | * @category Mathematical and Trigonometric Functions |
1157 | - * @param mixed $arg,... Data values |
|
1158 | 1154 | * @return float |
1159 | 1155 | */ |
1160 | 1156 | public static function SUM() |
@@ -1183,9 +1179,8 @@ discard block |
||
1183 | 1179 | * |
1184 | 1180 | * @access public |
1185 | 1181 | * @category Mathematical and Trigonometric Functions |
1186 | - * @param mixed $arg,... Data values |
|
1187 | 1182 | * @param string $condition The criteria that defines which cells will be summed. |
1188 | - * @return float |
|
1183 | + * @return integer |
|
1189 | 1184 | */ |
1190 | 1185 | public static function SUMIF($aArgs, $condition, $sumArgs = array()) |
1191 | 1186 | { |
@@ -1224,9 +1219,7 @@ discard block |
||
1224 | 1219 | * |
1225 | 1220 | * @access public |
1226 | 1221 | * @category Mathematical and Trigonometric Functions |
1227 | - * @param mixed $arg,... Data values |
|
1228 | - * @param string $condition The criteria that defines which cells will be summed. |
|
1229 | - * @return float |
|
1222 | + * @return integer |
|
1230 | 1223 | */ |
1231 | 1224 | public static function SUMIFS() |
1232 | 1225 | { |
@@ -1271,7 +1264,6 @@ discard block |
||
1271 | 1264 | * |
1272 | 1265 | * @access public |
1273 | 1266 | * @category Mathematical and Trigonometric Functions |
1274 | - * @param mixed $arg,... Data values |
|
1275 | 1267 | * @return float |
1276 | 1268 | */ |
1277 | 1269 | public static function SUMPRODUCT() |
@@ -1316,7 +1308,6 @@ discard block |
||
1316 | 1308 | * |
1317 | 1309 | * @access public |
1318 | 1310 | * @category Mathematical and Trigonometric Functions |
1319 | - * @param mixed $arg,... Data values |
|
1320 | 1311 | * @return float |
1321 | 1312 | */ |
1322 | 1313 | public static function SUMSQ() |
@@ -1415,7 +1406,7 @@ discard block |
||
1415 | 1406 | * |
1416 | 1407 | * Truncates value to the number of fractional digits by number_digits. |
1417 | 1408 | * |
1418 | - * @param float $value |
|
1409 | + * @param integer $value |
|
1419 | 1410 | * @param int $digits |
1420 | 1411 | * @return float Truncated value |
1421 | 1412 | */ |
@@ -231,6 +231,9 @@ discard block |
||
231 | 231 | return $this->loadIntoExisting($pFilename, $objPHPExcel); |
232 | 232 | } |
233 | 233 | |
234 | + /** |
|
235 | + * @param string $styleAttributeValue |
|
236 | + */ |
|
234 | 237 | protected static function identifyFixedStyleValue($styleList, &$styleAttributeValue) |
235 | 238 | { |
236 | 239 | $styleAttributeValue = strtolower($styleAttributeValue); |
@@ -786,6 +789,9 @@ discard block |
||
786 | 789 | } |
787 | 790 | |
788 | 791 | |
792 | + /** |
|
793 | + * @param string $charset |
|
794 | + */ |
|
789 | 795 | protected static function convertStringEncoding($string, $charset) |
790 | 796 | { |
791 | 797 | if ($charset != 'UTF-8') { |
@@ -816,7 +816,7 @@ discard block |
||
816 | 816 | * Return the eigenvector matrix |
817 | 817 | * |
818 | 818 | * @access public |
819 | - * @return V |
|
819 | + * @return Matrix |
|
820 | 820 | */ |
821 | 821 | public function getV() |
822 | 822 | { |
@@ -849,7 +849,7 @@ discard block |
||
849 | 849 | * Return the block diagonal eigenvalue matrix |
850 | 850 | * |
851 | 851 | * @access public |
852 | - * @return D |
|
852 | + * @return Matrix |
|
853 | 853 | */ |
854 | 854 | public function getD() |
855 | 855 | { |
@@ -436,7 +436,7 @@ discard block |
||
436 | 436 | * Return the left singular vectors |
437 | 437 | * |
438 | 438 | * @access public |
439 | - * @return U |
|
439 | + * @return Matrix |
|
440 | 440 | */ |
441 | 441 | public function getU() |
442 | 442 | { |
@@ -448,7 +448,7 @@ discard block |
||
448 | 448 | * Return the right singular vectors |
449 | 449 | * |
450 | 450 | * @access public |
451 | - * @return V |
|
451 | + * @return Matrix |
|
452 | 452 | */ |
453 | 453 | public function getV() |
454 | 454 | { |
@@ -472,7 +472,7 @@ discard block |
||
472 | 472 | * Return the diagonal matrix of singular values |
473 | 473 | * |
474 | 474 | * @access public |
475 | - * @return S |
|
475 | + * @return Matrix |
|
476 | 476 | */ |
477 | 477 | public function getS() |
478 | 478 | { |
@@ -81,7 +81,7 @@ |
||
81 | 81 | /** |
82 | 82 | * Return the Timezone transition for the specified timezone and timestamp |
83 | 83 | * |
84 | - * @param DateTimeZone $objTimezone The timezone for finding the transitions |
|
84 | + * @param \DateTimeZone $objTimezone The timezone for finding the transitions |
|
85 | 85 | * @param integer $timestamp PHP date/time value for finding the current transition |
86 | 86 | * @return array The current transition details |
87 | 87 | */ |
@@ -33,21 +33,21 @@ discard block |
||
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 |
||
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 |
@@ -32,20 +32,20 @@ discard block |
||
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 |
||
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 | ?> |
@@ -33,22 +33,22 @@ discard block |
||
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 |
||
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 |
@@ -32,21 +32,21 @@ discard block |
||
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 |
||
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 | ?> |