@@ -100,7 +100,7 @@ discard block |
||
100 | 100 | /** |
101 | 101 | * Get Condition type |
102 | 102 | * |
103 | - * @return string |
|
103 | + * @return integer |
|
104 | 104 | */ |
105 | 105 | public function getConditionType() |
106 | 106 | { |
@@ -122,7 +122,7 @@ discard block |
||
122 | 122 | /** |
123 | 123 | * Get Operator type |
124 | 124 | * |
125 | - * @return string |
|
125 | + * @return integer |
|
126 | 126 | */ |
127 | 127 | public function getOperatorType() |
128 | 128 | { |
@@ -467,6 +467,7 @@ discard block |
||
467 | 467 | * |
468 | 468 | * @param string $dynamicRuleType |
469 | 469 | * @param AutoFilter\Column &$filterColumn |
470 | + * @param AutoFilter\Column $filterColumn |
|
470 | 471 | * @return mixed[] |
471 | 472 | */ |
472 | 473 | private function dynamicFilterDateRange($dynamicRuleType, &$filterColumn) |
@@ -571,6 +572,11 @@ discard block |
||
571 | 572 | return array('method' => 'filterTestInCustomDataSet', 'arguments' => array('filterRules' => $ruleValues, 'join' => AutoFilter\Column::AUTOFILTER_COLUMN_JOIN_AND)); |
572 | 573 | } |
573 | 574 | |
575 | + /** |
|
576 | + * @param integer $columnID |
|
577 | + * @param integer $startRow |
|
578 | + * @param string $ruleType |
|
579 | + */ |
|
574 | 580 | private function calculateTopTenValue($columnID, $startRow, $endRow, $ruleType, $ruleValue) |
575 | 581 | { |
576 | 582 | $range = $columnID.$startRow.':'.$columnID.$endRow; |
@@ -707,8 +707,8 @@ |
||
707 | 707 | ? AutoFilter\Column\Rule::AUTOFILTER_COLUMN_RULE_GREATERTHAN |
708 | 708 | : AutoFilter\Column\Rule::AUTOFILTER_COLUMN_RULE_LESSTHAN; |
709 | 709 | $ruleValues[] = ['operator' => $operator, |
710 | - 'value' => $average, |
|
711 | - ]; |
|
710 | + 'value' => $average, |
|
711 | + ]; |
|
712 | 712 | $columnFilterTests[$columnID] = [ |
713 | 713 | 'method' => 'filterTestInCustomDataSet', |
714 | 714 | 'arguments' => ['filterRules' => $ruleValues, 'join' => AutoFilter\Column::AUTOFILTER_COLUMN_JOIN_OR], |
@@ -456,7 +456,7 @@ |
||
456 | 456 | * @var array |
457 | 457 | */ |
458 | 458 | private static $fromReplace = ['\*', '\?', '~~', '~.*', '~.?']; |
459 | - private static $toReplace = ['.*', '.', '~', '\*', '\?']; |
|
459 | + private static $toReplace = ['.*', '.', '~', '\*', '\?']; |
|
460 | 460 | |
461 | 461 | /** |
462 | 462 | * Convert a dynamic rule daterange to a custom filter range expression for ease of calculation |
@@ -60,7 +60,7 @@ |
||
60 | 60 | /** |
61 | 61 | * Create a new Dimension |
62 | 62 | * |
63 | - * @param int $pIndex Numeric row index |
|
63 | + * @param integer $initialValue |
|
64 | 64 | */ |
65 | 65 | public function __construct($initialValue = null) |
66 | 66 | { |
@@ -802,7 +802,7 @@ discard block |
||
802 | 802 | * Set first page number |
803 | 803 | * |
804 | 804 | * @param int $value |
805 | - * @return HeaderFooter |
|
805 | + * @return PageSetup |
|
806 | 806 | */ |
807 | 807 | public function setFirstPageNumber($value = null) |
808 | 808 | { |
@@ -813,7 +813,7 @@ discard block |
||
813 | 813 | /** |
814 | 814 | * Reset first page number |
815 | 815 | * |
816 | - * @return HeaderFooter |
|
816 | + * @return PageSetup |
|
817 | 817 | */ |
818 | 818 | public function resetFirstPageNumber() |
819 | 819 | { |
@@ -67,6 +67,7 @@ |
||
67 | 67 | |
68 | 68 | /** |
69 | 69 | * Process the object to be written |
70 | + * @return string |
|
70 | 71 | */ |
71 | 72 | public function close() |
72 | 73 | { |
@@ -504,7 +504,7 @@ discard block |
||
504 | 504 | * |
505 | 505 | * @access private |
506 | 506 | * @param mixed $token The token to convert. |
507 | - * @return mixed the converted token on success |
|
507 | + * @return string the converted token on success |
|
508 | 508 | */ |
509 | 509 | private function convert($token) |
510 | 510 | { |
@@ -574,7 +574,7 @@ discard block |
||
574 | 574 | * |
575 | 575 | * @access private |
576 | 576 | * @param string $string A string for conversion to its ptg value. |
577 | - * @return mixed the converted token on success |
|
577 | + * @return string the converted token on success |
|
578 | 578 | */ |
579 | 579 | private function convertString($string) |
580 | 580 | { |
@@ -654,7 +654,7 @@ discard block |
||
654 | 654 | * |
655 | 655 | * @access private |
656 | 656 | * @param string $token An Excel range in the Sheet1!A1:A2 format. |
657 | - * @return mixed The packed ptgArea3d token on success. |
|
657 | + * @return string The packed ptgArea3d token on success. |
|
658 | 658 | */ |
659 | 659 | private function convertRange3d($token) |
660 | 660 | { |
@@ -726,7 +726,7 @@ discard block |
||
726 | 726 | * |
727 | 727 | * @access private |
728 | 728 | * @param string $cell An Excel cell reference |
729 | - * @return mixed The packed ptgRef3d token on success. |
|
729 | + * @return string The packed ptgRef3d token on success. |
|
730 | 730 | */ |
731 | 731 | private function convertRef3d($cell) |
732 | 732 | { |
@@ -834,7 +834,7 @@ discard block |
||
834 | 834 | * |
835 | 835 | * @access private |
836 | 836 | * @param string $ext_ref The name of the external reference |
837 | - * @return mixed The reference index in packed() format on success |
|
837 | + * @return string The reference index in packed() format on success |
|
838 | 838 | */ |
839 | 839 | private function getRefIndex($ext_ref) |
840 | 840 | { |
@@ -925,7 +925,7 @@ discard block |
||
925 | 925 | * |
926 | 926 | * @access private |
927 | 927 | * @param string $cell The Excel cell reference to be packed |
928 | - * @return array Array containing the row and column in packed() format |
|
928 | + * @return string[] Array containing the row and column in packed() format |
|
929 | 929 | */ |
930 | 930 | private function cellToPackedRowcol($cell) |
931 | 931 | { |
@@ -954,7 +954,7 @@ discard block |
||
954 | 954 | * |
955 | 955 | * @access private |
956 | 956 | * @param string $range The Excel range to be packed |
957 | - * @return array Array containing (row1,col1,row2,col2) in packed() format |
|
957 | + * @return string[] Array containing (row1,col1,row2,col2) in packed() format |
|
958 | 958 | */ |
959 | 959 | private function rangeToPackedRange($range) |
960 | 960 | { |
@@ -1075,7 +1075,7 @@ discard block |
||
1075 | 1075 | * Checks if it's a valid token. |
1076 | 1076 | * |
1077 | 1077 | * @access private |
1078 | - * @param mixed $token The token to check. |
|
1078 | + * @param string $token The token to check. |
|
1079 | 1079 | * @return mixed The checked token or false on failure |
1080 | 1080 | */ |
1081 | 1081 | private function match($token) |
@@ -1157,7 +1157,7 @@ discard block |
||
1157 | 1157 | * @access public |
1158 | 1158 | * @param string $formula The formula to parse, without the initial equal |
1159 | 1159 | * sign (=). |
1160 | - * @return mixed true on success |
|
1160 | + * @return boolean true on success |
|
1161 | 1161 | */ |
1162 | 1162 | public function parse($formula) |
1163 | 1163 | { |
@@ -666,7 +666,7 @@ |
||
666 | 666 | list($row1, $col1) = $this->cellToPackedRowcol($cell1); |
667 | 667 | list($row2, $col2) = $this->cellToPackedRowcol($cell2); |
668 | 668 | } else { // It's a rows range (like 26:27) |
669 | - list($row1, $col1, $row2, $col2) = $this->rangeToPackedRange($cell1 . ':' . $cell2); |
|
669 | + list($row1, $col1, $row2, $col2) = $this->rangeToPackedRange($cell1 . ':' . $cell2); |
|
670 | 670 | } |
671 | 671 | |
672 | 672 | // The ptg value depends on the class of the ptg. |
@@ -114,11 +114,11 @@ discard block |
||
114 | 114 | public function __construct() |
115 | 115 | { |
116 | 116 | $this->currentCharacter = 0; |
117 | - $this->currentToken = ''; // The token we are working on. |
|
118 | - $this->formula = ''; // The formula to parse. |
|
119 | - $this->lookAhead = ''; // The character ahead of the current char. |
|
120 | - $this->parseTree = ''; // The parse tree to be generated. |
|
121 | - $this->initializeHashes(); // Initialize the hashes: ptg's and function's ptg's |
|
117 | + $this->currentToken = ''; // The token we are working on. |
|
118 | + $this->formula = ''; // The formula to parse. |
|
119 | + $this->lookAhead = ''; // The character ahead of the current char. |
|
120 | + $this->parseTree = ''; // The parse tree to be generated. |
|
121 | + $this->initializeHashes(); // Initialize the hashes: ptg's and function's ptg's |
|
122 | 122 | $this->externalSheets = []; |
123 | 123 | $this->references = []; |
124 | 124 | } |
@@ -242,256 +242,256 @@ discard block |
||
242 | 242 | // |
243 | 243 | $this->functions = [ |
244 | 244 | // function ptg args class vol |
245 | - 'COUNT' => [0, -1, 0, 0], |
|
246 | - 'IF' => [1, -1, 1, 0], |
|
247 | - 'ISNA' => [2, 1, 1, 0], |
|
248 | - 'ISERROR' => [3, 1, 1, 0], |
|
249 | - 'SUM' => [4, -1, 0, 0], |
|
250 | - 'AVERAGE' => [5, -1, 0, 0], |
|
251 | - 'MIN' => [6, -1, 0, 0], |
|
252 | - 'MAX' => [7, -1, 0, 0], |
|
253 | - 'ROW' => [8, -1, 0, 0], |
|
254 | - 'COLUMN' => [9, -1, 0, 0], |
|
255 | - 'NA' => [10, 0, 0, 0], |
|
256 | - 'NPV' => [11, -1, 1, 0], |
|
257 | - 'STDEV' => [12, -1, 0, 0], |
|
258 | - 'DOLLAR' => [13, -1, 1, 0], |
|
259 | - 'FIXED' => [14, -1, 1, 0], |
|
260 | - 'SIN' => [15, 1, 1, 0], |
|
261 | - 'COS' => [16, 1, 1, 0], |
|
262 | - 'TAN' => [17, 1, 1, 0], |
|
263 | - 'ATAN' => [18, 1, 1, 0], |
|
264 | - 'PI' => [19, 0, 1, 0], |
|
265 | - 'SQRT' => [20, 1, 1, 0], |
|
266 | - 'EXP' => [21, 1, 1, 0], |
|
267 | - 'LN' => [22, 1, 1, 0], |
|
268 | - 'LOG10' => [23, 1, 1, 0], |
|
269 | - 'ABS' => [24, 1, 1, 0], |
|
270 | - 'INT' => [25, 1, 1, 0], |
|
271 | - 'SIGN' => [26, 1, 1, 0], |
|
272 | - 'ROUND' => [27, 2, 1, 0], |
|
273 | - 'LOOKUP' => [28, -1, 0, 0], |
|
274 | - 'INDEX' => [29, -1, 0, 1], |
|
275 | - 'REPT' => [30, 2, 1, 0], |
|
276 | - 'MID' => [31, 3, 1, 0], |
|
277 | - 'LEN' => [32, 1, 1, 0], |
|
278 | - 'VALUE' => [33, 1, 1, 0], |
|
279 | - 'TRUE' => [34, 0, 1, 0], |
|
280 | - 'FALSE' => [35, 0, 1, 0], |
|
281 | - 'AND' => [36, -1, 0, 0], |
|
282 | - 'OR' => [37, -1, 0, 0], |
|
283 | - 'NOT' => [38, 1, 1, 0], |
|
284 | - 'MOD' => [39, 2, 1, 0], |
|
285 | - 'DCOUNT' => [40, 3, 0, 0], |
|
286 | - 'DSUM' => [41, 3, 0, 0], |
|
287 | - 'DAVERAGE' => [42, 3, 0, 0], |
|
288 | - 'DMIN' => [43, 3, 0, 0], |
|
289 | - 'DMAX' => [44, 3, 0, 0], |
|
290 | - 'DSTDEV' => [45, 3, 0, 0], |
|
291 | - 'VAR' => [46, -1, 0, 0], |
|
292 | - 'DVAR' => [47, 3, 0, 0], |
|
293 | - 'TEXT' => [48, 2, 1, 0], |
|
294 | - 'LINEST' => [49, -1, 0, 0], |
|
295 | - 'TREND' => [50, -1, 0, 0], |
|
296 | - 'LOGEST' => [51, -1, 0, 0], |
|
297 | - 'GROWTH' => [52, -1, 0, 0], |
|
298 | - 'PV' => [56, -1, 1, 0], |
|
299 | - 'FV' => [57, -1, 1, 0], |
|
300 | - 'NPER' => [58, -1, 1, 0], |
|
301 | - 'PMT' => [59, -1, 1, 0], |
|
302 | - 'RATE' => [60, -1, 1, 0], |
|
303 | - 'MIRR' => [61, 3, 0, 0], |
|
304 | - 'IRR' => [62, -1, 0, 0], |
|
305 | - 'RAND' => [63, 0, 1, 1], |
|
306 | - 'MATCH' => [64, -1, 0, 0], |
|
307 | - 'DATE' => [65, 3, 1, 0], |
|
308 | - 'TIME' => [66, 3, 1, 0], |
|
309 | - 'DAY' => [67, 1, 1, 0], |
|
310 | - 'MONTH' => [68, 1, 1, 0], |
|
311 | - 'YEAR' => [69, 1, 1, 0], |
|
312 | - 'WEEKDAY' => [70, -1, 1, 0], |
|
313 | - 'HOUR' => [71, 1, 1, 0], |
|
314 | - 'MINUTE' => [72, 1, 1, 0], |
|
315 | - 'SECOND' => [73, 1, 1, 0], |
|
316 | - 'NOW' => [74, 0, 1, 1], |
|
317 | - 'AREAS' => [75, 1, 0, 1], |
|
318 | - 'ROWS' => [76, 1, 0, 1], |
|
319 | - 'COLUMNS' => [77, 1, 0, 1], |
|
320 | - 'OFFSET' => [78, -1, 0, 1], |
|
321 | - 'SEARCH' => [82, -1, 1, 0], |
|
322 | - 'TRANSPOSE' => [83, 1, 1, 0], |
|
323 | - 'TYPE' => [86, 1, 1, 0], |
|
324 | - 'ATAN2' => [97, 2, 1, 0], |
|
325 | - 'ASIN' => [98, 1, 1, 0], |
|
326 | - 'ACOS' => [99, 1, 1, 0], |
|
327 | - 'CHOOSE' => [100, -1, 1, 0], |
|
328 | - 'HLOOKUP' => [101, -1, 0, 0], |
|
329 | - 'VLOOKUP' => [102, -1, 0, 0], |
|
330 | - 'ISREF' => [105, 1, 0, 0], |
|
331 | - 'LOG' => [109, -1, 1, 0], |
|
332 | - 'CHAR' => [111, 1, 1, 0], |
|
333 | - 'LOWER' => [112, 1, 1, 0], |
|
334 | - 'UPPER' => [113, 1, 1, 0], |
|
335 | - 'PROPER' => [114, 1, 1, 0], |
|
336 | - 'LEFT' => [115, -1, 1, 0], |
|
337 | - 'RIGHT' => [116, -1, 1, 0], |
|
338 | - 'EXACT' => [117, 2, 1, 0], |
|
339 | - 'TRIM' => [118, 1, 1, 0], |
|
340 | - 'REPLACE' => [119, 4, 1, 0], |
|
341 | - 'SUBSTITUTE' => [120, -1, 1, 0], |
|
342 | - 'CODE' => [121, 1, 1, 0], |
|
343 | - 'FIND' => [124, -1, 1, 0], |
|
344 | - 'CELL' => [125, -1, 0, 1], |
|
345 | - 'ISERR' => [126, 1, 1, 0], |
|
346 | - 'ISTEXT' => [127, 1, 1, 0], |
|
347 | - 'ISNUMBER' => [128, 1, 1, 0], |
|
348 | - 'ISBLANK' => [129, 1, 1, 0], |
|
349 | - 'T' => [130, 1, 0, 0], |
|
350 | - 'N' => [131, 1, 0, 0], |
|
351 | - 'DATEVALUE' => [140, 1, 1, 0], |
|
352 | - 'TIMEVALUE' => [141, 1, 1, 0], |
|
353 | - 'SLN' => [142, 3, 1, 0], |
|
354 | - 'SYD' => [143, 4, 1, 0], |
|
355 | - 'DDB' => [144, -1, 1, 0], |
|
356 | - 'INDIRECT' => [148, -1, 1, 1], |
|
357 | - 'CALL' => [150, -1, 1, 0], |
|
358 | - 'CLEAN' => [162, 1, 1, 0], |
|
359 | - 'MDETERM' => [163, 1, 2, 0], |
|
360 | - 'MINVERSE' => [164, 1, 2, 0], |
|
361 | - 'MMULT' => [165, 2, 2, 0], |
|
362 | - 'IPMT' => [167, -1, 1, 0], |
|
363 | - 'PPMT' => [168, -1, 1, 0], |
|
364 | - 'COUNTA' => [169, -1, 0, 0], |
|
365 | - 'PRODUCT' => [183, -1, 0, 0], |
|
366 | - 'FACT' => [184, 1, 1, 0], |
|
367 | - 'DPRODUCT' => [189, 3, 0, 0], |
|
368 | - 'ISNONTEXT' => [190, 1, 1, 0], |
|
369 | - 'STDEVP' => [193, -1, 0, 0], |
|
370 | - 'VARP' => [194, -1, 0, 0], |
|
371 | - 'DSTDEVP' => [195, 3, 0, 0], |
|
372 | - 'DVARP' => [196, 3, 0, 0], |
|
373 | - 'TRUNC' => [197, -1, 1, 0], |
|
374 | - 'ISLOGICAL' => [198, 1, 1, 0], |
|
375 | - 'DCOUNTA' => [199, 3, 0, 0], |
|
376 | - 'USDOLLAR' => [204, -1, 1, 0], |
|
377 | - 'FINDB' => [205, -1, 1, 0], |
|
378 | - 'SEARCHB' => [206, -1, 1, 0], |
|
379 | - 'REPLACEB' => [207, 4, 1, 0], |
|
380 | - 'LEFTB' => [208, -1, 1, 0], |
|
381 | - 'RIGHTB' => [209, -1, 1, 0], |
|
382 | - 'MIDB' => [210, 3, 1, 0], |
|
383 | - 'LENB' => [211, 1, 1, 0], |
|
384 | - 'ROUNDUP' => [212, 2, 1, 0], |
|
385 | - 'ROUNDDOWN' => [213, 2, 1, 0], |
|
386 | - 'ASC' => [214, 1, 1, 0], |
|
387 | - 'DBCS' => [215, 1, 1, 0], |
|
388 | - 'RANK' => [216, -1, 0, 0], |
|
389 | - 'ADDRESS' => [219, -1, 1, 0], |
|
390 | - 'DAYS360' => [220, -1, 1, 0], |
|
391 | - 'TODAY' => [221, 0, 1, 1], |
|
392 | - 'VDB' => [222, -1, 1, 0], |
|
393 | - 'MEDIAN' => [227, -1, 0, 0], |
|
394 | - 'SUMPRODUCT' => [228, -1, 2, 0], |
|
395 | - 'SINH' => [229, 1, 1, 0], |
|
396 | - 'COSH' => [230, 1, 1, 0], |
|
397 | - 'TANH' => [231, 1, 1, 0], |
|
398 | - 'ASINH' => [232, 1, 1, 0], |
|
399 | - 'ACOSH' => [233, 1, 1, 0], |
|
400 | - 'ATANH' => [234, 1, 1, 0], |
|
401 | - 'DGET' => [235, 3, 0, 0], |
|
402 | - 'INFO' => [244, 1, 1, 1], |
|
403 | - 'DB' => [247, -1, 1, 0], |
|
404 | - 'FREQUENCY' => [252, 2, 0, 0], |
|
405 | - 'ERROR.TYPE' => [261, 1, 1, 0], |
|
406 | - 'REGISTER.ID' => [267, -1, 1, 0], |
|
407 | - 'AVEDEV' => [269, -1, 0, 0], |
|
408 | - 'BETADIST' => [270, -1, 1, 0], |
|
409 | - 'GAMMALN' => [271, 1, 1, 0], |
|
410 | - 'BETAINV' => [272, -1, 1, 0], |
|
411 | - 'BINOMDIST' => [273, 4, 1, 0], |
|
412 | - 'CHIDIST' => [274, 2, 1, 0], |
|
413 | - 'CHIINV' => [275, 2, 1, 0], |
|
414 | - 'COMBIN' => [276, 2, 1, 0], |
|
415 | - 'CONFIDENCE' => [277, 3, 1, 0], |
|
416 | - 'CRITBINOM' => [278, 3, 1, 0], |
|
417 | - 'EVEN' => [279, 1, 1, 0], |
|
418 | - 'EXPONDIST' => [280, 3, 1, 0], |
|
419 | - 'FDIST' => [281, 3, 1, 0], |
|
420 | - 'FINV' => [282, 3, 1, 0], |
|
421 | - 'FISHER' => [283, 1, 1, 0], |
|
422 | - 'FISHERINV' => [284, 1, 1, 0], |
|
423 | - 'FLOOR' => [285, 2, 1, 0], |
|
424 | - 'GAMMADIST' => [286, 4, 1, 0], |
|
425 | - 'GAMMAINV' => [287, 3, 1, 0], |
|
426 | - 'CEILING' => [288, 2, 1, 0], |
|
427 | - 'HYPGEOMDIST' => [289, 4, 1, 0], |
|
428 | - 'LOGNORMDIST' => [290, 3, 1, 0], |
|
429 | - 'LOGINV' => [291, 3, 1, 0], |
|
430 | - 'NEGBINOMDIST' => [292, 3, 1, 0], |
|
431 | - 'NORMDIST' => [293, 4, 1, 0], |
|
432 | - 'NORMSDIST' => [294, 1, 1, 0], |
|
433 | - 'NORMINV' => [295, 3, 1, 0], |
|
434 | - 'NORMSINV' => [296, 1, 1, 0], |
|
435 | - 'STANDARDIZE' => [297, 3, 1, 0], |
|
436 | - 'ODD' => [298, 1, 1, 0], |
|
437 | - 'PERMUT' => [299, 2, 1, 0], |
|
438 | - 'POISSON' => [300, 3, 1, 0], |
|
439 | - 'TDIST' => [301, 3, 1, 0], |
|
440 | - 'WEIBULL' => [302, 4, 1, 0], |
|
441 | - 'SUMXMY2' => [303, 2, 2, 0], |
|
442 | - 'SUMX2MY2' => [304, 2, 2, 0], |
|
443 | - 'SUMX2PY2' => [305, 2, 2, 0], |
|
444 | - 'CHITEST' => [306, 2, 2, 0], |
|
445 | - 'CORREL' => [307, 2, 2, 0], |
|
446 | - 'COVAR' => [308, 2, 2, 0], |
|
447 | - 'FORECAST' => [309, 3, 2, 0], |
|
448 | - 'FTEST' => [310, 2, 2, 0], |
|
449 | - 'INTERCEPT' => [311, 2, 2, 0], |
|
450 | - 'PEARSON' => [312, 2, 2, 0], |
|
451 | - 'RSQ' => [313, 2, 2, 0], |
|
452 | - 'STEYX' => [314, 2, 2, 0], |
|
453 | - 'SLOPE' => [315, 2, 2, 0], |
|
454 | - 'TTEST' => [316, 4, 2, 0], |
|
455 | - 'PROB' => [317, -1, 2, 0], |
|
456 | - 'DEVSQ' => [318, -1, 0, 0], |
|
457 | - 'GEOMEAN' => [319, -1, 0, 0], |
|
458 | - 'HARMEAN' => [320, -1, 0, 0], |
|
459 | - 'SUMSQ' => [321, -1, 0, 0], |
|
460 | - 'KURT' => [322, -1, 0, 0], |
|
461 | - 'SKEW' => [323, -1, 0, 0], |
|
462 | - 'ZTEST' => [324, -1, 0, 0], |
|
463 | - 'LARGE' => [325, 2, 0, 0], |
|
464 | - 'SMALL' => [326, 2, 0, 0], |
|
465 | - 'QUARTILE' => [327, 2, 0, 0], |
|
466 | - 'PERCENTILE' => [328, 2, 0, 0], |
|
467 | - 'PERCENTRANK' => [329, -1, 0, 0], |
|
468 | - 'MODE' => [330, -1, 2, 0], |
|
469 | - 'TRIMMEAN' => [331, 2, 0, 0], |
|
470 | - 'TINV' => [332, 2, 1, 0], |
|
471 | - 'CONCATENATE' => [336, -1, 1, 0], |
|
472 | - 'POWER' => [337, 2, 1, 0], |
|
473 | - 'RADIANS' => [342, 1, 1, 0], |
|
474 | - 'DEGREES' => [343, 1, 1, 0], |
|
475 | - 'SUBTOTAL' => [344, -1, 0, 0], |
|
476 | - 'SUMIF' => [345, -1, 0, 0], |
|
477 | - 'COUNTIF' => [346, 2, 0, 0], |
|
478 | - 'COUNTBLANK' => [347, 1, 0, 0], |
|
479 | - 'ISPMT' => [350, 4, 1, 0], |
|
480 | - 'DATEDIF' => [351, 3, 1, 0], |
|
481 | - 'DATESTRING' => [352, 1, 1, 0], |
|
482 | - 'NUMBERSTRING' => [353, 2, 1, 0], |
|
483 | - 'ROMAN' => [354, -1, 1, 0], |
|
484 | - 'GETPIVOTDATA' => [358, -1, 0, 0], |
|
485 | - 'HYPERLINK' => [359, -1, 1, 0], |
|
486 | - 'PHONETIC' => [360, 1, 0, 0], |
|
487 | - 'AVERAGEA' => [361, -1, 0, 0], |
|
488 | - 'MAXA' => [362, -1, 0, 0], |
|
489 | - 'MINA' => [363, -1, 0, 0], |
|
490 | - 'STDEVPA' => [364, -1, 0, 0], |
|
491 | - 'VARPA' => [365, -1, 0, 0], |
|
492 | - 'STDEVA' => [366, -1, 0, 0], |
|
493 | - 'VARA' => [367, -1, 0, 0], |
|
494 | - 'BAHTTEXT' => [368, 1, 0, 0], |
|
245 | + 'COUNT' => [0, -1, 0, 0], |
|
246 | + 'IF' => [1, -1, 1, 0], |
|
247 | + 'ISNA' => [2, 1, 1, 0], |
|
248 | + 'ISERROR' => [3, 1, 1, 0], |
|
249 | + 'SUM' => [4, -1, 0, 0], |
|
250 | + 'AVERAGE' => [5, -1, 0, 0], |
|
251 | + 'MIN' => [6, -1, 0, 0], |
|
252 | + 'MAX' => [7, -1, 0, 0], |
|
253 | + 'ROW' => [8, -1, 0, 0], |
|
254 | + 'COLUMN' => [9, -1, 0, 0], |
|
255 | + 'NA' => [10, 0, 0, 0], |
|
256 | + 'NPV' => [11, -1, 1, 0], |
|
257 | + 'STDEV' => [12, -1, 0, 0], |
|
258 | + 'DOLLAR' => [13, -1, 1, 0], |
|
259 | + 'FIXED' => [14, -1, 1, 0], |
|
260 | + 'SIN' => [15, 1, 1, 0], |
|
261 | + 'COS' => [16, 1, 1, 0], |
|
262 | + 'TAN' => [17, 1, 1, 0], |
|
263 | + 'ATAN' => [18, 1, 1, 0], |
|
264 | + 'PI' => [19, 0, 1, 0], |
|
265 | + 'SQRT' => [20, 1, 1, 0], |
|
266 | + 'EXP' => [21, 1, 1, 0], |
|
267 | + 'LN' => [22, 1, 1, 0], |
|
268 | + 'LOG10' => [23, 1, 1, 0], |
|
269 | + 'ABS' => [24, 1, 1, 0], |
|
270 | + 'INT' => [25, 1, 1, 0], |
|
271 | + 'SIGN' => [26, 1, 1, 0], |
|
272 | + 'ROUND' => [27, 2, 1, 0], |
|
273 | + 'LOOKUP' => [28, -1, 0, 0], |
|
274 | + 'INDEX' => [29, -1, 0, 1], |
|
275 | + 'REPT' => [30, 2, 1, 0], |
|
276 | + 'MID' => [31, 3, 1, 0], |
|
277 | + 'LEN' => [32, 1, 1, 0], |
|
278 | + 'VALUE' => [33, 1, 1, 0], |
|
279 | + 'TRUE' => [34, 0, 1, 0], |
|
280 | + 'FALSE' => [35, 0, 1, 0], |
|
281 | + 'AND' => [36, -1, 0, 0], |
|
282 | + 'OR' => [37, -1, 0, 0], |
|
283 | + 'NOT' => [38, 1, 1, 0], |
|
284 | + 'MOD' => [39, 2, 1, 0], |
|
285 | + 'DCOUNT' => [40, 3, 0, 0], |
|
286 | + 'DSUM' => [41, 3, 0, 0], |
|
287 | + 'DAVERAGE' => [42, 3, 0, 0], |
|
288 | + 'DMIN' => [43, 3, 0, 0], |
|
289 | + 'DMAX' => [44, 3, 0, 0], |
|
290 | + 'DSTDEV' => [45, 3, 0, 0], |
|
291 | + 'VAR' => [46, -1, 0, 0], |
|
292 | + 'DVAR' => [47, 3, 0, 0], |
|
293 | + 'TEXT' => [48, 2, 1, 0], |
|
294 | + 'LINEST' => [49, -1, 0, 0], |
|
295 | + 'TREND' => [50, -1, 0, 0], |
|
296 | + 'LOGEST' => [51, -1, 0, 0], |
|
297 | + 'GROWTH' => [52, -1, 0, 0], |
|
298 | + 'PV' => [56, -1, 1, 0], |
|
299 | + 'FV' => [57, -1, 1, 0], |
|
300 | + 'NPER' => [58, -1, 1, 0], |
|
301 | + 'PMT' => [59, -1, 1, 0], |
|
302 | + 'RATE' => [60, -1, 1, 0], |
|
303 | + 'MIRR' => [61, 3, 0, 0], |
|
304 | + 'IRR' => [62, -1, 0, 0], |
|
305 | + 'RAND' => [63, 0, 1, 1], |
|
306 | + 'MATCH' => [64, -1, 0, 0], |
|
307 | + 'DATE' => [65, 3, 1, 0], |
|
308 | + 'TIME' => [66, 3, 1, 0], |
|
309 | + 'DAY' => [67, 1, 1, 0], |
|
310 | + 'MONTH' => [68, 1, 1, 0], |
|
311 | + 'YEAR' => [69, 1, 1, 0], |
|
312 | + 'WEEKDAY' => [70, -1, 1, 0], |
|
313 | + 'HOUR' => [71, 1, 1, 0], |
|
314 | + 'MINUTE' => [72, 1, 1, 0], |
|
315 | + 'SECOND' => [73, 1, 1, 0], |
|
316 | + 'NOW' => [74, 0, 1, 1], |
|
317 | + 'AREAS' => [75, 1, 0, 1], |
|
318 | + 'ROWS' => [76, 1, 0, 1], |
|
319 | + 'COLUMNS' => [77, 1, 0, 1], |
|
320 | + 'OFFSET' => [78, -1, 0, 1], |
|
321 | + 'SEARCH' => [82, -1, 1, 0], |
|
322 | + 'TRANSPOSE' => [83, 1, 1, 0], |
|
323 | + 'TYPE' => [86, 1, 1, 0], |
|
324 | + 'ATAN2' => [97, 2, 1, 0], |
|
325 | + 'ASIN' => [98, 1, 1, 0], |
|
326 | + 'ACOS' => [99, 1, 1, 0], |
|
327 | + 'CHOOSE' => [100, -1, 1, 0], |
|
328 | + 'HLOOKUP' => [101, -1, 0, 0], |
|
329 | + 'VLOOKUP' => [102, -1, 0, 0], |
|
330 | + 'ISREF' => [105, 1, 0, 0], |
|
331 | + 'LOG' => [109, -1, 1, 0], |
|
332 | + 'CHAR' => [111, 1, 1, 0], |
|
333 | + 'LOWER' => [112, 1, 1, 0], |
|
334 | + 'UPPER' => [113, 1, 1, 0], |
|
335 | + 'PROPER' => [114, 1, 1, 0], |
|
336 | + 'LEFT' => [115, -1, 1, 0], |
|
337 | + 'RIGHT' => [116, -1, 1, 0], |
|
338 | + 'EXACT' => [117, 2, 1, 0], |
|
339 | + 'TRIM' => [118, 1, 1, 0], |
|
340 | + 'REPLACE' => [119, 4, 1, 0], |
|
341 | + 'SUBSTITUTE' => [120, -1, 1, 0], |
|
342 | + 'CODE' => [121, 1, 1, 0], |
|
343 | + 'FIND' => [124, -1, 1, 0], |
|
344 | + 'CELL' => [125, -1, 0, 1], |
|
345 | + 'ISERR' => [126, 1, 1, 0], |
|
346 | + 'ISTEXT' => [127, 1, 1, 0], |
|
347 | + 'ISNUMBER' => [128, 1, 1, 0], |
|
348 | + 'ISBLANK' => [129, 1, 1, 0], |
|
349 | + 'T' => [130, 1, 0, 0], |
|
350 | + 'N' => [131, 1, 0, 0], |
|
351 | + 'DATEVALUE' => [140, 1, 1, 0], |
|
352 | + 'TIMEVALUE' => [141, 1, 1, 0], |
|
353 | + 'SLN' => [142, 3, 1, 0], |
|
354 | + 'SYD' => [143, 4, 1, 0], |
|
355 | + 'DDB' => [144, -1, 1, 0], |
|
356 | + 'INDIRECT' => [148, -1, 1, 1], |
|
357 | + 'CALL' => [150, -1, 1, 0], |
|
358 | + 'CLEAN' => [162, 1, 1, 0], |
|
359 | + 'MDETERM' => [163, 1, 2, 0], |
|
360 | + 'MINVERSE' => [164, 1, 2, 0], |
|
361 | + 'MMULT' => [165, 2, 2, 0], |
|
362 | + 'IPMT' => [167, -1, 1, 0], |
|
363 | + 'PPMT' => [168, -1, 1, 0], |
|
364 | + 'COUNTA' => [169, -1, 0, 0], |
|
365 | + 'PRODUCT' => [183, -1, 0, 0], |
|
366 | + 'FACT' => [184, 1, 1, 0], |
|
367 | + 'DPRODUCT' => [189, 3, 0, 0], |
|
368 | + 'ISNONTEXT' => [190, 1, 1, 0], |
|
369 | + 'STDEVP' => [193, -1, 0, 0], |
|
370 | + 'VARP' => [194, -1, 0, 0], |
|
371 | + 'DSTDEVP' => [195, 3, 0, 0], |
|
372 | + 'DVARP' => [196, 3, 0, 0], |
|
373 | + 'TRUNC' => [197, -1, 1, 0], |
|
374 | + 'ISLOGICAL' => [198, 1, 1, 0], |
|
375 | + 'DCOUNTA' => [199, 3, 0, 0], |
|
376 | + 'USDOLLAR' => [204, -1, 1, 0], |
|
377 | + 'FINDB' => [205, -1, 1, 0], |
|
378 | + 'SEARCHB' => [206, -1, 1, 0], |
|
379 | + 'REPLACEB' => [207, 4, 1, 0], |
|
380 | + 'LEFTB' => [208, -1, 1, 0], |
|
381 | + 'RIGHTB' => [209, -1, 1, 0], |
|
382 | + 'MIDB' => [210, 3, 1, 0], |
|
383 | + 'LENB' => [211, 1, 1, 0], |
|
384 | + 'ROUNDUP' => [212, 2, 1, 0], |
|
385 | + 'ROUNDDOWN' => [213, 2, 1, 0], |
|
386 | + 'ASC' => [214, 1, 1, 0], |
|
387 | + 'DBCS' => [215, 1, 1, 0], |
|
388 | + 'RANK' => [216, -1, 0, 0], |
|
389 | + 'ADDRESS' => [219, -1, 1, 0], |
|
390 | + 'DAYS360' => [220, -1, 1, 0], |
|
391 | + 'TODAY' => [221, 0, 1, 1], |
|
392 | + 'VDB' => [222, -1, 1, 0], |
|
393 | + 'MEDIAN' => [227, -1, 0, 0], |
|
394 | + 'SUMPRODUCT' => [228, -1, 2, 0], |
|
395 | + 'SINH' => [229, 1, 1, 0], |
|
396 | + 'COSH' => [230, 1, 1, 0], |
|
397 | + 'TANH' => [231, 1, 1, 0], |
|
398 | + 'ASINH' => [232, 1, 1, 0], |
|
399 | + 'ACOSH' => [233, 1, 1, 0], |
|
400 | + 'ATANH' => [234, 1, 1, 0], |
|
401 | + 'DGET' => [235, 3, 0, 0], |
|
402 | + 'INFO' => [244, 1, 1, 1], |
|
403 | + 'DB' => [247, -1, 1, 0], |
|
404 | + 'FREQUENCY' => [252, 2, 0, 0], |
|
405 | + 'ERROR.TYPE' => [261, 1, 1, 0], |
|
406 | + 'REGISTER.ID' => [267, -1, 1, 0], |
|
407 | + 'AVEDEV' => [269, -1, 0, 0], |
|
408 | + 'BETADIST' => [270, -1, 1, 0], |
|
409 | + 'GAMMALN' => [271, 1, 1, 0], |
|
410 | + 'BETAINV' => [272, -1, 1, 0], |
|
411 | + 'BINOMDIST' => [273, 4, 1, 0], |
|
412 | + 'CHIDIST' => [274, 2, 1, 0], |
|
413 | + 'CHIINV' => [275, 2, 1, 0], |
|
414 | + 'COMBIN' => [276, 2, 1, 0], |
|
415 | + 'CONFIDENCE' => [277, 3, 1, 0], |
|
416 | + 'CRITBINOM' => [278, 3, 1, 0], |
|
417 | + 'EVEN' => [279, 1, 1, 0], |
|
418 | + 'EXPONDIST' => [280, 3, 1, 0], |
|
419 | + 'FDIST' => [281, 3, 1, 0], |
|
420 | + 'FINV' => [282, 3, 1, 0], |
|
421 | + 'FISHER' => [283, 1, 1, 0], |
|
422 | + 'FISHERINV' => [284, 1, 1, 0], |
|
423 | + 'FLOOR' => [285, 2, 1, 0], |
|
424 | + 'GAMMADIST' => [286, 4, 1, 0], |
|
425 | + 'GAMMAINV' => [287, 3, 1, 0], |
|
426 | + 'CEILING' => [288, 2, 1, 0], |
|
427 | + 'HYPGEOMDIST' => [289, 4, 1, 0], |
|
428 | + 'LOGNORMDIST' => [290, 3, 1, 0], |
|
429 | + 'LOGINV' => [291, 3, 1, 0], |
|
430 | + 'NEGBINOMDIST' => [292, 3, 1, 0], |
|
431 | + 'NORMDIST' => [293, 4, 1, 0], |
|
432 | + 'NORMSDIST' => [294, 1, 1, 0], |
|
433 | + 'NORMINV' => [295, 3, 1, 0], |
|
434 | + 'NORMSINV' => [296, 1, 1, 0], |
|
435 | + 'STANDARDIZE' => [297, 3, 1, 0], |
|
436 | + 'ODD' => [298, 1, 1, 0], |
|
437 | + 'PERMUT' => [299, 2, 1, 0], |
|
438 | + 'POISSON' => [300, 3, 1, 0], |
|
439 | + 'TDIST' => [301, 3, 1, 0], |
|
440 | + 'WEIBULL' => [302, 4, 1, 0], |
|
441 | + 'SUMXMY2' => [303, 2, 2, 0], |
|
442 | + 'SUMX2MY2' => [304, 2, 2, 0], |
|
443 | + 'SUMX2PY2' => [305, 2, 2, 0], |
|
444 | + 'CHITEST' => [306, 2, 2, 0], |
|
445 | + 'CORREL' => [307, 2, 2, 0], |
|
446 | + 'COVAR' => [308, 2, 2, 0], |
|
447 | + 'FORECAST' => [309, 3, 2, 0], |
|
448 | + 'FTEST' => [310, 2, 2, 0], |
|
449 | + 'INTERCEPT' => [311, 2, 2, 0], |
|
450 | + 'PEARSON' => [312, 2, 2, 0], |
|
451 | + 'RSQ' => [313, 2, 2, 0], |
|
452 | + 'STEYX' => [314, 2, 2, 0], |
|
453 | + 'SLOPE' => [315, 2, 2, 0], |
|
454 | + 'TTEST' => [316, 4, 2, 0], |
|
455 | + 'PROB' => [317, -1, 2, 0], |
|
456 | + 'DEVSQ' => [318, -1, 0, 0], |
|
457 | + 'GEOMEAN' => [319, -1, 0, 0], |
|
458 | + 'HARMEAN' => [320, -1, 0, 0], |
|
459 | + 'SUMSQ' => [321, -1, 0, 0], |
|
460 | + 'KURT' => [322, -1, 0, 0], |
|
461 | + 'SKEW' => [323, -1, 0, 0], |
|
462 | + 'ZTEST' => [324, -1, 0, 0], |
|
463 | + 'LARGE' => [325, 2, 0, 0], |
|
464 | + 'SMALL' => [326, 2, 0, 0], |
|
465 | + 'QUARTILE' => [327, 2, 0, 0], |
|
466 | + 'PERCENTILE' => [328, 2, 0, 0], |
|
467 | + 'PERCENTRANK' => [329, -1, 0, 0], |
|
468 | + 'MODE' => [330, -1, 2, 0], |
|
469 | + 'TRIMMEAN' => [331, 2, 0, 0], |
|
470 | + 'TINV' => [332, 2, 1, 0], |
|
471 | + 'CONCATENATE' => [336, -1, 1, 0], |
|
472 | + 'POWER' => [337, 2, 1, 0], |
|
473 | + 'RADIANS' => [342, 1, 1, 0], |
|
474 | + 'DEGREES' => [343, 1, 1, 0], |
|
475 | + 'SUBTOTAL' => [344, -1, 0, 0], |
|
476 | + 'SUMIF' => [345, -1, 0, 0], |
|
477 | + 'COUNTIF' => [346, 2, 0, 0], |
|
478 | + 'COUNTBLANK' => [347, 1, 0, 0], |
|
479 | + 'ISPMT' => [350, 4, 1, 0], |
|
480 | + 'DATEDIF' => [351, 3, 1, 0], |
|
481 | + 'DATESTRING' => [352, 1, 1, 0], |
|
482 | + 'NUMBERSTRING' => [353, 2, 1, 0], |
|
483 | + 'ROMAN' => [354, -1, 1, 0], |
|
484 | + 'GETPIVOTDATA' => [358, -1, 0, 0], |
|
485 | + 'HYPERLINK' => [359, -1, 1, 0], |
|
486 | + 'PHONETIC' => [360, 1, 0, 0], |
|
487 | + 'AVERAGEA' => [361, -1, 0, 0], |
|
488 | + 'MAXA' => [362, -1, 0, 0], |
|
489 | + 'MINA' => [363, -1, 0, 0], |
|
490 | + 'STDEVPA' => [364, -1, 0, 0], |
|
491 | + 'VARPA' => [365, -1, 0, 0], |
|
492 | + 'STDEVA' => [366, -1, 0, 0], |
|
493 | + 'VARA' => [367, -1, 0, 0], |
|
494 | + 'BAHTTEXT' => [368, 1, 0, 0], |
|
495 | 495 | ]; |
496 | 496 | } |
497 | 497 | |
@@ -1318,12 +1318,12 @@ discard block |
||
1318 | 1318 | private function fact() |
1319 | 1319 | { |
1320 | 1320 | if ($this->currentToken == '(') { |
1321 | - $this->advance(); // eat the "(" |
|
1321 | + $this->advance(); // eat the "(" |
|
1322 | 1322 | $result = $this->parenthesizedExpression(); |
1323 | 1323 | if ($this->currentToken != ')') { |
1324 | 1324 | throw new \PhpSpreadsheet\Writer\Exception("')' token expected."); |
1325 | 1325 | } |
1326 | - $this->advance(); // eat the ")" |
|
1326 | + $this->advance(); // eat the ")" |
|
1327 | 1327 | return $result; |
1328 | 1328 | } |
1329 | 1329 | // if it's a reference |
@@ -1372,7 +1372,7 @@ discard block |
||
1372 | 1372 | // If it's a number or a percent |
1373 | 1373 | if ($this->lookAhead == '%') { |
1374 | 1374 | $result = $this->createTree('ptgPercent', $this->currentToken, ''); |
1375 | - $this->advance(); // Skip the percentage operator once we've pre-built that tree |
|
1375 | + $this->advance(); // Skip the percentage operator once we've pre-built that tree |
|
1376 | 1376 | } else { |
1377 | 1377 | $result = $this->createTree($this->currentToken, '', ''); |
1378 | 1378 | } |
@@ -1400,12 +1400,12 @@ discard block |
||
1400 | 1400 | $function = strtoupper($this->currentToken); |
1401 | 1401 | $result = ''; // initialize result |
1402 | 1402 | $this->advance(); |
1403 | - $this->advance(); // eat the "(" |
|
1403 | + $this->advance(); // eat the "(" |
|
1404 | 1404 | while ($this->currentToken != ')') { |
1405 | 1405 | /**/ |
1406 | 1406 | if ($num_args > 0) { |
1407 | 1407 | if ($this->currentToken == ',' || $this->currentToken == ';') { |
1408 | - $this->advance(); // eat the "," or ";" |
|
1408 | + $this->advance(); // eat the "," or ";" |
|
1409 | 1409 | } else { |
1410 | 1410 | throw new \PhpSpreadsheet\Writer\Exception("Syntax error: comma expected in function $function, arg #{$num_args}"); |
1411 | 1411 | } |
@@ -1427,7 +1427,7 @@ discard block |
||
1427 | 1427 | } |
1428 | 1428 | |
1429 | 1429 | $result = $this->createTree($function, $result, $num_args); |
1430 | - $this->advance(); // eat the ")" |
|
1430 | + $this->advance(); // eat the ")" |
|
1431 | 1431 | return $result; |
1432 | 1432 | } |
1433 | 1433 |
@@ -200,10 +200,12 @@ discard block |
||
200 | 200 | * @param int &$str_unique Total number of unique strings |
201 | 201 | * @param array &$str_table String Table |
202 | 202 | * @param array &$colors Colour Table |
203 | - * @param mixed $parser The formula parser created for the Workbook |
|
203 | + * @param Parser $parser The formula parser created for the Workbook |
|
204 | 204 | * @param boolean $preCalculateFormulas Flag indicating whether formulas should be calculated or just written |
205 | 205 | * @param string $phpSheet The worksheet to write |
206 | 206 | * @param \PHPExcel\Worksheet $phpSheet |
207 | + * @param integer $str_total |
|
208 | + * @param integer $str_unique |
|
207 | 209 | */ |
208 | 210 | public function __construct(&$str_total, &$str_unique, &$str_table, &$colors, $parser, $preCalculateFormulas, $phpSheet) |
209 | 211 | { |
@@ -614,7 +616,7 @@ discard block |
||
614 | 616 | * @param integer $row Zero indexed row |
615 | 617 | * @param integer $col Zero indexed column |
616 | 618 | * @param float $num The number to write |
617 | - * @param mixed $xfIndex The optional XF format |
|
619 | + * @param integer $xfIndex The optional XF format |
|
618 | 620 | * @return integer |
619 | 621 | */ |
620 | 622 | private function writeNumber($row, $col, $num, $xfIndex) |
@@ -652,7 +654,7 @@ discard block |
||
652 | 654 | * @param int $row Row index (0-based) |
653 | 655 | * @param int $col Column index (0-based) |
654 | 656 | * @param string $str The string |
655 | - * @param mixed $xfIndex The XF format index for the cell |
|
657 | + * @param integer $xfIndex The XF format index for the cell |
|
656 | 658 | * @param array $arrcRun Index to Font record and characters beginning |
657 | 659 | */ |
658 | 660 | private function writeRichTextString($row, $col, $str, $xfIndex, $arrcRun) |
@@ -720,7 +722,7 @@ discard block |
||
720 | 722 | * @param integer $row Zero indexed row |
721 | 723 | * @param integer $col Zero indexed column |
722 | 724 | * @param string $str The string to write |
723 | - * @param mixed $xfIndex The XF format index for the cell |
|
725 | + * @param integer $xfIndex The XF format index for the cell |
|
724 | 726 | * @return integer |
725 | 727 | */ |
726 | 728 | private function writeLabelSst($row, $col, $str, $xfIndex) |
@@ -785,7 +787,7 @@ discard block |
||
785 | 787 | * |
786 | 788 | * @param integer $row Zero indexed row |
787 | 789 | * @param integer $col Zero indexed column |
788 | - * @param mixed $xfIndex The XF format index |
|
790 | + * @param integer $xfIndex The XF format index |
|
789 | 791 | */ |
790 | 792 | public function writeBlank($row, $col, $xfIndex) |
791 | 793 | { |
@@ -830,7 +832,7 @@ discard block |
||
830 | 832 | * @param integer $row Zero indexed row |
831 | 833 | * @param integer $col Zero indexed column |
832 | 834 | * @param string $formula The formula text string |
833 | - * @param mixed $xfIndex The XF format index |
|
835 | + * @param integer $xfIndex The XF format index |
|
834 | 836 | * @param mixed $calculatedValue Calculated value |
835 | 837 | * @return integer |
836 | 838 | */ |
@@ -2307,8 +2309,8 @@ discard block |
||
2307 | 2309 | * @param mixed $bitmap The bitmap filename or GD-image resource |
2308 | 2310 | * @param integer $x The horizontal position (offset) of the image inside the cell. |
2309 | 2311 | * @param integer $y The vertical position (offset) of the image inside the cell. |
2310 | - * @param float $scale_x The horizontal scale |
|
2311 | - * @param float $scale_y The vertical scale |
|
2312 | + * @param integer $scale_x The horizontal scale |
|
2313 | + * @param integer $scale_y The vertical scale |
|
2312 | 2314 | */ |
2313 | 2315 | public function insertBitmap($row, $col, $bitmap, $x = 0, $y = 0, $scale_x = 1, $scale_y = 1) |
2314 | 2316 | { |
@@ -1020,8 +1020,8 @@ discard block |
||
1020 | 1020 | |
1021 | 1021 | // Write the packed data |
1022 | 1022 | $this->append($header . $data . |
1023 | - $unknown1 . $options . |
|
1024 | - $unknown2 . $url_len . $url); |
|
1023 | + $unknown1 . $options . |
|
1024 | + $unknown2 . $url_len . $url); |
|
1025 | 1025 | |
1026 | 1026 | return 0; |
1027 | 1027 | } |
@@ -1069,8 +1069,8 @@ discard block |
||
1069 | 1069 | |
1070 | 1070 | // Write the packed data |
1071 | 1071 | $this->append($header . $data . |
1072 | - $unknown1 . $options . |
|
1073 | - $url_len . $url); |
|
1072 | + $unknown1 . $options . |
|
1073 | + $url_len . $url); |
|
1074 | 1074 | |
1075 | 1075 | return 0; |
1076 | 1076 | } |
@@ -1151,14 +1151,14 @@ discard block |
||
1151 | 1151 | |
1152 | 1152 | // Pack the main data stream |
1153 | 1153 | $data = pack('vvvv', $row1, $row2, $col1, $col2) . |
1154 | - $unknown1 . |
|
1155 | - $link_type . |
|
1156 | - $unknown2 . |
|
1157 | - $up_count . |
|
1158 | - $dir_short_len . |
|
1159 | - $dir_short . |
|
1160 | - $unknown3 . |
|
1161 | - $stream_len;/*. |
|
1154 | + $unknown1 . |
|
1155 | + $link_type . |
|
1156 | + $unknown2 . |
|
1157 | + $up_count . |
|
1158 | + $dir_short_len . |
|
1159 | + $dir_short . |
|
1160 | + $unknown3 . |
|
1161 | + $stream_len;/*. |
|
1162 | 1162 | $dir_long_len . |
1163 | 1163 | $unknown4 . |
1164 | 1164 | $dir_long . |
@@ -542,7 +542,7 @@ discard block |
||
542 | 542 | } |
543 | 543 | |
544 | 544 | $firstCellCoordinates = \PhpSpreadsheet\Cell::coordinateFromString($firstCell); // e.g. array(0, 1) |
545 | - $lastCellCoordinates = \PhpSpreadsheet\Cell::coordinateFromString($lastCell); // e.g. array(1, 6) |
|
545 | + $lastCellCoordinates = \PhpSpreadsheet\Cell::coordinateFromString($lastCell); // e.g. array(1, 6) |
|
546 | 546 | |
547 | 547 | return pack('vvvv', $firstCellCoordinates[1] - 1, $lastCellCoordinates[1] - 1, \PhpSpreadsheet\Cell::columnIndexFromString($firstCellCoordinates[0]) - 1, \PhpSpreadsheet\Cell::columnIndexFromString($lastCellCoordinates[0]) - 1); |
548 | 548 | } |
@@ -616,8 +616,8 @@ discard block |
||
616 | 616 | */ |
617 | 617 | private function writeNumber($row, $col, $num, $xfIndex) |
618 | 618 | { |
619 | - $record = 0x0203; // Record identifier |
|
620 | - $length = 0x000E; // Number of bytes to follow |
|
619 | + $record = 0x0203; // Record identifier |
|
620 | + $length = 0x000E; // Number of bytes to follow |
|
621 | 621 | |
622 | 622 | $header = pack('vv', $record, $length); |
623 | 623 | $data = pack('vvv', $row, $col, $xfIndex); |
@@ -655,8 +655,8 @@ discard block |
||
655 | 655 | */ |
656 | 656 | private function writeRichTextString($row, $col, $str, $xfIndex, $arrcRun) |
657 | 657 | { |
658 | - $record = 0x00FD; // Record identifier |
|
659 | - $length = 0x000A; // Bytes to follow |
|
658 | + $record = 0x00FD; // Record identifier |
|
659 | + $length = 0x000A; // Bytes to follow |
|
660 | 660 | $str = \PhpSpreadsheet\Shared\StringHelper::UTF8toBIFF8UnicodeShort($str, $arrcRun); |
661 | 661 | |
662 | 662 | /* check if string is already present */ |
@@ -687,8 +687,8 @@ discard block |
||
687 | 687 | private function writeLabel($row, $col, $str, $xfIndex) |
688 | 688 | { |
689 | 689 | $strlen = strlen($str); |
690 | - $record = 0x0204; // Record identifier |
|
691 | - $length = 0x0008 + $strlen; // Bytes to follow |
|
690 | + $record = 0x0204; // Record identifier |
|
691 | + $length = 0x0008 + $strlen; // Bytes to follow |
|
692 | 692 | |
693 | 693 | $str_error = 0; |
694 | 694 | |
@@ -722,8 +722,8 @@ discard block |
||
722 | 722 | */ |
723 | 723 | private function writeLabelSst($row, $col, $str, $xfIndex) |
724 | 724 | { |
725 | - $record = 0x00FD; // Record identifier |
|
726 | - $length = 0x000A; // Bytes to follow |
|
725 | + $record = 0x00FD; // Record identifier |
|
726 | + $length = 0x000A; // Bytes to follow |
|
727 | 727 | |
728 | 728 | $str = \PhpSpreadsheet\Shared\StringHelper::UTF8toBIFF8UnicodeLong($str); |
729 | 729 | |
@@ -749,8 +749,8 @@ discard block |
||
749 | 749 | private function writeNote($row, $col, $note) |
750 | 750 | { |
751 | 751 | $note_length = strlen($note); |
752 | - $record = 0x001C; // Record identifier |
|
753 | - $max_length = 2048; // Maximun length for a NOTE record |
|
752 | + $record = 0x001C; // Record identifier |
|
753 | + $max_length = 2048; // Maximun length for a NOTE record |
|
754 | 754 | |
755 | 755 | // Length for this record is no more than 2048 + 6 |
756 | 756 | $length = 0x0006 + min($note_length, 2048); |
@@ -787,8 +787,8 @@ discard block |
||
787 | 787 | */ |
788 | 788 | public function writeBlank($row, $col, $xfIndex) |
789 | 789 | { |
790 | - $record = 0x0201; // Record identifier |
|
791 | - $length = 0x0006; // Number of bytes to follow |
|
790 | + $record = 0x0201; // Record identifier |
|
791 | + $length = 0x0006; // Number of bytes to follow |
|
792 | 792 | |
793 | 793 | $header = pack('vv', $record, $length); |
794 | 794 | $data = pack('vvv', $row, $col, $xfIndex); |
@@ -836,7 +836,7 @@ discard block |
||
836 | 836 | */ |
837 | 837 | private function writeFormula($row, $col, $formula, $xfIndex, $calculatedValue) |
838 | 838 | { |
839 | - $record = 0x0006; // Record identifier |
|
839 | + $record = 0x0006; // Record identifier |
|
840 | 840 | |
841 | 841 | // Initialize possible additional value for STRING record that should be written after the FORMULA record? |
842 | 842 | $stringValue = null; |
@@ -871,8 +871,8 @@ discard block |
||
871 | 871 | $num = pack('d', 0x00); |
872 | 872 | } |
873 | 873 | |
874 | - $grbit = 0x03; // Option flags |
|
875 | - $unknown = 0x0000; // Must be zero |
|
874 | + $grbit = 0x03; // Option flags |
|
875 | + $unknown = 0x0000; // Must be zero |
|
876 | 876 | |
877 | 877 | // Strip the '=' or '@' sign at the beginning of the formula string |
878 | 878 | if ($formula{0} == '=') { |
@@ -889,8 +889,8 @@ discard block |
||
889 | 889 | $error = $this->parser->parse($formula); |
890 | 890 | $formula = $this->parser->toReversePolish(); |
891 | 891 | |
892 | - $formlen = strlen($formula); // Length of the binary string |
|
893 | - $length = 0x16 + $formlen; // Length of the record data |
|
892 | + $formlen = strlen($formula); // Length of the binary string |
|
893 | + $length = 0x16 + $formlen; // Length of the record data |
|
894 | 894 | |
895 | 895 | $header = pack('vv', $record, $length); |
896 | 896 | |
@@ -917,7 +917,7 @@ discard block |
||
917 | 917 | */ |
918 | 918 | private function writeStringRecord($stringValue) |
919 | 919 | { |
920 | - $record = 0x0207; // Record identifier |
|
920 | + $record = 0x0207; // Record identifier |
|
921 | 921 | $data = \PhpSpreadsheet\Shared\StringHelper::UTF8toBIFF8UnicodeLong($stringValue); |
922 | 922 | |
923 | 923 | $length = strlen($data); |
@@ -994,8 +994,8 @@ discard block |
||
994 | 994 | */ |
995 | 995 | public function writeUrlWeb($row1, $col1, $row2, $col2, $url) |
996 | 996 | { |
997 | - $record = 0x01B8; // Record identifier |
|
998 | - $length = 0x00000; // Bytes to follow |
|
997 | + $record = 0x01B8; // Record identifier |
|
998 | + $length = 0x00000; // Bytes to follow |
|
999 | 999 | |
1000 | 1000 | // Pack the undocumented parts of the hyperlink stream |
1001 | 1001 | $unknown1 = pack('H*', 'D0C9EA79F9BACE118C8200AA004BA90B02000000'); |
@@ -1039,8 +1039,8 @@ discard block |
||
1039 | 1039 | */ |
1040 | 1040 | public function writeUrlInternal($row1, $col1, $row2, $col2, $url) |
1041 | 1041 | { |
1042 | - $record = 0x01B8; // Record identifier |
|
1043 | - $length = 0x00000; // Bytes to follow |
|
1042 | + $record = 0x01B8; // Record identifier |
|
1043 | + $length = 0x00000; // Bytes to follow |
|
1044 | 1044 | |
1045 | 1045 | // Strip URL type |
1046 | 1046 | $url = preg_replace('/^internal:/', '', $url); |
@@ -1098,8 +1098,8 @@ discard block |
||
1098 | 1098 | return; //($this->writeUrlExternal_net($row1, $col1, $row2, $col2, $url, $str, $format)); |
1099 | 1099 | } |
1100 | 1100 | |
1101 | - $record = 0x01B8; // Record identifier |
|
1102 | - $length = 0x00000; // Bytes to follow |
|
1101 | + $record = 0x01B8; // Record identifier |
|
1102 | + $length = 0x00000; // Bytes to follow |
|
1103 | 1103 | |
1104 | 1104 | // Strip URL type and change Unix dir separator to Dos style (if needed) |
1105 | 1105 | // |
@@ -1158,7 +1158,7 @@ discard block |
||
1158 | 1158 | $dir_short_len . |
1159 | 1159 | $dir_short . |
1160 | 1160 | $unknown3 . |
1161 | - $stream_len;/*. |
|
1161 | + $stream_len; /*. |
|
1162 | 1162 | $dir_long_len . |
1163 | 1163 | $unknown4 . |
1164 | 1164 | $dir_long . |
@@ -1187,14 +1187,14 @@ discard block |
||
1187 | 1187 | */ |
1188 | 1188 | private function writeRow($row, $height, $xfIndex, $hidden = false, $level = 0) |
1189 | 1189 | { |
1190 | - $record = 0x0208; // Record identifier |
|
1191 | - $length = 0x0010; // Number of bytes to follow |
|
1192 | - |
|
1193 | - $colMic = 0x0000; // First defined column |
|
1194 | - $colMac = 0x0000; // Last defined column |
|
1195 | - $irwMac = 0x0000; // Used by Excel to optimise loading |
|
1196 | - $reserved = 0x0000; // Reserved |
|
1197 | - $grbit = 0x0000; // Option flags |
|
1190 | + $record = 0x0208; // Record identifier |
|
1191 | + $length = 0x0010; // Number of bytes to follow |
|
1192 | + |
|
1193 | + $colMic = 0x0000; // First defined column |
|
1194 | + $colMac = 0x0000; // Last defined column |
|
1195 | + $irwMac = 0x0000; // Used by Excel to optimise loading |
|
1196 | + $reserved = 0x0000; // Reserved |
|
1197 | + $grbit = 0x0000; // Option flags |
|
1198 | 1198 | $ixfe = $xfIndex; |
1199 | 1199 | |
1200 | 1200 | if ($height < 0) { |
@@ -1203,9 +1203,9 @@ discard block |
||
1203 | 1203 | |
1204 | 1204 | // Use writeRow($row, null, $XF) to set XF format without setting height |
1205 | 1205 | if ($height != null) { |
1206 | - $miyRw = $height * 20; // row height |
|
1206 | + $miyRw = $height * 20; // row height |
|
1207 | 1207 | } else { |
1208 | - $miyRw = 0xff; // default row height is 256 |
|
1208 | + $miyRw = 0xff; // default row height is 256 |
|
1209 | 1209 | } |
1210 | 1210 | |
1211 | 1211 | // Set the options flags. fUnsynced is used to show that the font and row |
@@ -1250,26 +1250,26 @@ discard block |
||
1250 | 1250 | */ |
1251 | 1251 | private function writeWindow2() |
1252 | 1252 | { |
1253 | - $record = 0x023E; // Record identifier |
|
1253 | + $record = 0x023E; // Record identifier |
|
1254 | 1254 | $length = 0x0012; |
1255 | 1255 | |
1256 | - $grbit = 0x00B6; // Option flags |
|
1257 | - $rwTop = 0x0000; // Top row visible in window |
|
1258 | - $colLeft = 0x0000; // Leftmost column visible in window |
|
1256 | + $grbit = 0x00B6; // Option flags |
|
1257 | + $rwTop = 0x0000; // Top row visible in window |
|
1258 | + $colLeft = 0x0000; // Leftmost column visible in window |
|
1259 | 1259 | |
1260 | 1260 | // The options flags that comprise $grbit |
1261 | - $fDspFmla = 0; // 0 - bit |
|
1261 | + $fDspFmla = 0; // 0 - bit |
|
1262 | 1262 | $fDspGrid = $this->phpSheet->getShowGridlines() ? 1 : 0; // 1 |
1263 | 1263 | $fDspRwCol = $this->phpSheet->getShowRowColHeaders() ? 1 : 0; // 2 |
1264 | - $fFrozen = $this->phpSheet->getFreezePane() ? 1 : 0; // 3 |
|
1265 | - $fDspZeros = 1; // 4 |
|
1266 | - $fDefaultHdr = 1; // 5 |
|
1264 | + $fFrozen = $this->phpSheet->getFreezePane() ? 1 : 0; // 3 |
|
1265 | + $fDspZeros = 1; // 4 |
|
1266 | + $fDefaultHdr = 1; // 5 |
|
1267 | 1267 | $fArabic = $this->phpSheet->getRightToLeft() ? 1 : 0; // 6 |
1268 | - $fDspGuts = $this->outlineOn; // 7 |
|
1269 | - $fFrozenNoSplit = 0; // 0 - bit |
|
1268 | + $fDspGuts = $this->outlineOn; // 7 |
|
1269 | + $fFrozenNoSplit = 0; // 0 - bit |
|
1270 | 1270 | // no support in PhpSpreadsheet for selected sheet, therefore sheet is only selected if it is the active sheet |
1271 | 1271 | $fSelected = ($this->phpSheet === $this->phpSheet->getParent()->getActiveSheet()) ? 1 : 0; |
1272 | - $fPaged = 1; // 2 |
|
1272 | + $fPaged = 1; // 2 |
|
1273 | 1273 | $fPageBreakPreview = $this->phpSheet->getSheetView()->getView() === \PhpSpreadsheet\Worksheet\SheetView::SHEETVIEW_PAGE_BREAK_PREVIEW; |
1274 | 1274 | |
1275 | 1275 | $grbit = $fDspFmla; |
@@ -1312,8 +1312,8 @@ discard block |
||
1312 | 1312 | // convert to twips |
1313 | 1313 | $defaultRowHeight = (int) 20 * $defaultRowHeight; |
1314 | 1314 | |
1315 | - $record = 0x0225; // Record identifier |
|
1316 | - $length = 0x0004; // Number of bytes to follow |
|
1315 | + $record = 0x0225; // Record identifier |
|
1316 | + $length = 0x0004; // Number of bytes to follow |
|
1317 | 1317 | |
1318 | 1318 | $header = pack('vv', $record, $length); |
1319 | 1319 | $data = pack('vv', 1, $defaultRowHeight); |
@@ -1327,8 +1327,8 @@ discard block |
||
1327 | 1327 | { |
1328 | 1328 | $defaultColWidth = 8; |
1329 | 1329 | |
1330 | - $record = 0x0055; // Record identifier |
|
1331 | - $length = 0x0002; // Number of bytes to follow |
|
1330 | + $record = 0x0055; // Record identifier |
|
1331 | + $length = 0x0002; // Number of bytes to follow |
|
1332 | 1332 | |
1333 | 1333 | $header = pack('vv', $record, $length); |
1334 | 1334 | $data = pack('v', $defaultColWidth); |
@@ -1377,13 +1377,13 @@ discard block |
||
1377 | 1377 | } else { |
1378 | 1378 | $level = 0; |
1379 | 1379 | } |
1380 | - $record = 0x007D; // Record identifier |
|
1381 | - $length = 0x000C; // Number of bytes to follow |
|
1380 | + $record = 0x007D; // Record identifier |
|
1381 | + $length = 0x000C; // Number of bytes to follow |
|
1382 | 1382 | |
1383 | - $coldx *= 256; // Convert to units of 1/256 of a char |
|
1383 | + $coldx *= 256; // Convert to units of 1/256 of a char |
|
1384 | 1384 | |
1385 | 1385 | $ixfe = $xfIndex; |
1386 | - $reserved = 0x0000; // Reserved |
|
1386 | + $reserved = 0x0000; // Reserved |
|
1387 | 1387 | |
1388 | 1388 | $level = max(0, min($level, 7)); |
1389 | 1389 | $grbit |= $level << 8; |
@@ -1424,20 +1424,20 @@ discard block |
||
1424 | 1424 | $rwFirst = min($rwFirst, 65535); |
1425 | 1425 | $rwLast = min($rwLast, 65535); |
1426 | 1426 | |
1427 | - $record = 0x001D; // Record identifier |
|
1428 | - $length = 0x000F; // Number of bytes to follow |
|
1427 | + $record = 0x001D; // Record identifier |
|
1428 | + $length = 0x000F; // Number of bytes to follow |
|
1429 | 1429 | |
1430 | - $pnn = $this->activePane; // Pane position |
|
1431 | - $rwAct = $rwFirst; // Active row |
|
1432 | - $colAct = $colFirst; // Active column |
|
1433 | - $irefAct = 0; // Active cell ref |
|
1434 | - $cref = 1; // Number of refs |
|
1430 | + $pnn = $this->activePane; // Pane position |
|
1431 | + $rwAct = $rwFirst; // Active row |
|
1432 | + $colAct = $colFirst; // Active column |
|
1433 | + $irefAct = 0; // Active cell ref |
|
1434 | + $cref = 1; // Number of refs |
|
1435 | 1435 | |
1436 | 1436 | if (!isset($rwLast)) { |
1437 | - $rwLast = $rwFirst; // Last row in reference |
|
1437 | + $rwLast = $rwFirst; // Last row in reference |
|
1438 | 1438 | } |
1439 | 1439 | if (!isset($colLast)) { |
1440 | - $colLast = $colFirst; // Last col in reference |
|
1440 | + $colLast = $colFirst; // Last col in reference |
|
1441 | 1441 | } |
1442 | 1442 | |
1443 | 1443 | // Swap last row/col for first row/col as necessary |
@@ -1621,7 +1621,7 @@ discard block |
||
1621 | 1621 | |
1622 | 1622 | $length = strlen($recordData); |
1623 | 1623 | |
1624 | - $record = 0x0868; // Record identifier |
|
1624 | + $record = 0x0868; // Record identifier |
|
1625 | 1625 | $header = pack('vv', $record, $length); |
1626 | 1626 | $this->append($header . $recordData); |
1627 | 1627 | } |
@@ -1641,8 +1641,8 @@ discard block |
||
1641 | 1641 | */ |
1642 | 1642 | private function writeExterncount($count) |
1643 | 1643 | { |
1644 | - $record = 0x0016; // Record identifier |
|
1645 | - $length = 0x0002; // Number of bytes to follow |
|
1644 | + $record = 0x0016; // Record identifier |
|
1645 | + $length = 0x0002; // Number of bytes to follow |
|
1646 | 1646 | |
1647 | 1647 | $header = pack('vv', $record, $length); |
1648 | 1648 | $data = pack('v', $count); |
@@ -1659,20 +1659,20 @@ discard block |
||
1659 | 1659 | */ |
1660 | 1660 | private function writeExternsheet($sheetname) |
1661 | 1661 | { |
1662 | - $record = 0x0017; // Record identifier |
|
1662 | + $record = 0x0017; // Record identifier |
|
1663 | 1663 | |
1664 | 1664 | // References to the current sheet are encoded differently to references to |
1665 | 1665 | // external sheets. |
1666 | 1666 | // |
1667 | 1667 | if ($this->phpSheet->getTitle() == $sheetname) { |
1668 | 1668 | $sheetname = ''; |
1669 | - $length = 0x02; // The following 2 bytes |
|
1670 | - $cch = 1; // The following byte |
|
1671 | - $rgch = 0x02; // Self reference |
|
1669 | + $length = 0x02; // The following 2 bytes |
|
1670 | + $cch = 1; // The following byte |
|
1671 | + $rgch = 0x02; // Self reference |
|
1672 | 1672 | } else { |
1673 | 1673 | $length = 0x02 + strlen($sheetname); |
1674 | 1674 | $cch = strlen($sheetname); |
1675 | - $rgch = 0x03; // Reference to a sheet in the current workbook |
|
1675 | + $rgch = 0x03; // Reference to a sheet in the current workbook |
|
1676 | 1676 | } |
1677 | 1677 | |
1678 | 1678 | $header = pack('vv', $record, $length); |
@@ -1707,8 +1707,8 @@ discard block |
||
1707 | 1707 | } else { |
1708 | 1708 | $pnnAct = null; |
1709 | 1709 | } |
1710 | - $record = 0x0041; // Record identifier |
|
1711 | - $length = 0x000A; // Number of bytes to follow |
|
1710 | + $record = 0x0041; // Record identifier |
|
1711 | + $length = 0x000A; // Number of bytes to follow |
|
1712 | 1712 | |
1713 | 1713 | // Code specific to frozen or thawed panes. |
1714 | 1714 | if ($this->phpSheet->getFreezePane()) { |
@@ -1767,38 +1767,38 @@ discard block |
||
1767 | 1767 | */ |
1768 | 1768 | private function writeSetup() |
1769 | 1769 | { |
1770 | - $record = 0x00A1; // Record identifier |
|
1771 | - $length = 0x0022; // Number of bytes to follow |
|
1770 | + $record = 0x00A1; // Record identifier |
|
1771 | + $length = 0x0022; // Number of bytes to follow |
|
1772 | 1772 | |
1773 | - $iPaperSize = $this->phpSheet->getPageSetup()->getPaperSize(); // Paper size |
|
1773 | + $iPaperSize = $this->phpSheet->getPageSetup()->getPaperSize(); // Paper size |
|
1774 | 1774 | |
1775 | 1775 | $iScale = $this->phpSheet->getPageSetup()->getScale() ? |
1776 | - $this->phpSheet->getPageSetup()->getScale() : 100; // Print scaling factor |
|
1776 | + $this->phpSheet->getPageSetup()->getScale() : 100; // Print scaling factor |
|
1777 | 1777 | |
1778 | - $iPageStart = 0x01; // Starting page number |
|
1779 | - $iFitWidth = (int) $this->phpSheet->getPageSetup()->getFitToWidth(); // Fit to number of pages wide |
|
1780 | - $iFitHeight = (int) $this->phpSheet->getPageSetup()->getFitToHeight(); // Fit to number of pages high |
|
1781 | - $grbit = 0x00; // Option flags |
|
1782 | - $iRes = 0x0258; // Print resolution |
|
1783 | - $iVRes = 0x0258; // Vertical print resolution |
|
1778 | + $iPageStart = 0x01; // Starting page number |
|
1779 | + $iFitWidth = (int) $this->phpSheet->getPageSetup()->getFitToWidth(); // Fit to number of pages wide |
|
1780 | + $iFitHeight = (int) $this->phpSheet->getPageSetup()->getFitToHeight(); // Fit to number of pages high |
|
1781 | + $grbit = 0x00; // Option flags |
|
1782 | + $iRes = 0x0258; // Print resolution |
|
1783 | + $iVRes = 0x0258; // Vertical print resolution |
|
1784 | 1784 | |
1785 | - $numHdr = $this->phpSheet->getPageMargins()->getHeader(); // Header Margin |
|
1785 | + $numHdr = $this->phpSheet->getPageMargins()->getHeader(); // Header Margin |
|
1786 | 1786 | |
1787 | - $numFtr = $this->phpSheet->getPageMargins()->getFooter(); // Footer Margin |
|
1788 | - $iCopies = 0x01; // Number of copies |
|
1787 | + $numFtr = $this->phpSheet->getPageMargins()->getFooter(); // Footer Margin |
|
1788 | + $iCopies = 0x01; // Number of copies |
|
1789 | 1789 | |
1790 | - $fLeftToRight = 0x0; // Print over then down |
|
1790 | + $fLeftToRight = 0x0; // Print over then down |
|
1791 | 1791 | |
1792 | 1792 | // Page orientation |
1793 | 1793 | $fLandscape = ($this->phpSheet->getPageSetup()->getOrientation() == \PhpSpreadsheet\Worksheet\PageSetup::ORIENTATION_LANDSCAPE) ? |
1794 | 1794 | 0x0 : 0x1; |
1795 | 1795 | |
1796 | - $fNoPls = 0x0; // Setup not read from printer |
|
1797 | - $fNoColor = 0x0; // Print black and white |
|
1798 | - $fDraft = 0x0; // Print draft quality |
|
1799 | - $fNotes = 0x0; // Print notes |
|
1800 | - $fNoOrient = 0x0; // Orientation not set |
|
1801 | - $fUsePage = 0x0; // Use custom starting page |
|
1796 | + $fNoPls = 0x0; // Setup not read from printer |
|
1797 | + $fNoColor = 0x0; // Print black and white |
|
1798 | + $fDraft = 0x0; // Print draft quality |
|
1799 | + $fNotes = 0x0; // Print notes |
|
1800 | + $fNoOrient = 0x0; // Orientation not set |
|
1801 | + $fUsePage = 0x0; // Use custom starting page |
|
1802 | 1802 | |
1803 | 1803 | $grbit = $fLeftToRight; |
1804 | 1804 | $grbit |= $fLandscape << 1; |
@@ -1828,7 +1828,7 @@ discard block |
||
1828 | 1828 | */ |
1829 | 1829 | private function writeHeader() |
1830 | 1830 | { |
1831 | - $record = 0x0014; // Record identifier |
|
1831 | + $record = 0x0014; // Record identifier |
|
1832 | 1832 | |
1833 | 1833 | /* removing for now |
1834 | 1834 | // need to fix character count (multibyte!) |
@@ -1852,7 +1852,7 @@ discard block |
||
1852 | 1852 | */ |
1853 | 1853 | private function writeFooter() |
1854 | 1854 | { |
1855 | - $record = 0x0015; // Record identifier |
|
1855 | + $record = 0x0015; // Record identifier |
|
1856 | 1856 | |
1857 | 1857 | /* removing for now |
1858 | 1858 | // need to fix character count (multibyte!) |
@@ -1876,10 +1876,10 @@ discard block |
||
1876 | 1876 | */ |
1877 | 1877 | private function writeHcenter() |
1878 | 1878 | { |
1879 | - $record = 0x0083; // Record identifier |
|
1880 | - $length = 0x0002; // Bytes to follow |
|
1879 | + $record = 0x0083; // Record identifier |
|
1880 | + $length = 0x0002; // Bytes to follow |
|
1881 | 1881 | |
1882 | - $fHCenter = $this->phpSheet->getPageSetup()->getHorizontalCentered() ? 1 : 0; // Horizontal centering |
|
1882 | + $fHCenter = $this->phpSheet->getPageSetup()->getHorizontalCentered() ? 1 : 0; // Horizontal centering |
|
1883 | 1883 | |
1884 | 1884 | $header = pack('vv', $record, $length); |
1885 | 1885 | $data = pack('v', $fHCenter); |
@@ -1892,10 +1892,10 @@ discard block |
||
1892 | 1892 | */ |
1893 | 1893 | private function writeVcenter() |
1894 | 1894 | { |
1895 | - $record = 0x0084; // Record identifier |
|
1896 | - $length = 0x0002; // Bytes to follow |
|
1895 | + $record = 0x0084; // Record identifier |
|
1896 | + $length = 0x0002; // Bytes to follow |
|
1897 | 1897 | |
1898 | - $fVCenter = $this->phpSheet->getPageSetup()->getVerticalCentered() ? 1 : 0; // Horizontal centering |
|
1898 | + $fVCenter = $this->phpSheet->getPageSetup()->getVerticalCentered() ? 1 : 0; // Horizontal centering |
|
1899 | 1899 | |
1900 | 1900 | $header = pack('vv', $record, $length); |
1901 | 1901 | $data = pack('v', $fVCenter); |
@@ -1907,10 +1907,10 @@ discard block |
||
1907 | 1907 | */ |
1908 | 1908 | private function writeMarginLeft() |
1909 | 1909 | { |
1910 | - $record = 0x0026; // Record identifier |
|
1911 | - $length = 0x0008; // Bytes to follow |
|
1910 | + $record = 0x0026; // Record identifier |
|
1911 | + $length = 0x0008; // Bytes to follow |
|
1912 | 1912 | |
1913 | - $margin = $this->phpSheet->getPageMargins()->getLeft(); // Margin in inches |
|
1913 | + $margin = $this->phpSheet->getPageMargins()->getLeft(); // Margin in inches |
|
1914 | 1914 | |
1915 | 1915 | $header = pack('vv', $record, $length); |
1916 | 1916 | $data = pack('d', $margin); |
@@ -1926,10 +1926,10 @@ discard block |
||
1926 | 1926 | */ |
1927 | 1927 | private function writeMarginRight() |
1928 | 1928 | { |
1929 | - $record = 0x0027; // Record identifier |
|
1930 | - $length = 0x0008; // Bytes to follow |
|
1929 | + $record = 0x0027; // Record identifier |
|
1930 | + $length = 0x0008; // Bytes to follow |
|
1931 | 1931 | |
1932 | - $margin = $this->phpSheet->getPageMargins()->getRight(); // Margin in inches |
|
1932 | + $margin = $this->phpSheet->getPageMargins()->getRight(); // Margin in inches |
|
1933 | 1933 | |
1934 | 1934 | $header = pack('vv', $record, $length); |
1935 | 1935 | $data = pack('d', $margin); |
@@ -1945,10 +1945,10 @@ discard block |
||
1945 | 1945 | */ |
1946 | 1946 | private function writeMarginTop() |
1947 | 1947 | { |
1948 | - $record = 0x0028; // Record identifier |
|
1949 | - $length = 0x0008; // Bytes to follow |
|
1948 | + $record = 0x0028; // Record identifier |
|
1949 | + $length = 0x0008; // Bytes to follow |
|
1950 | 1950 | |
1951 | - $margin = $this->phpSheet->getPageMargins()->getTop(); // Margin in inches |
|
1951 | + $margin = $this->phpSheet->getPageMargins()->getTop(); // Margin in inches |
|
1952 | 1952 | |
1953 | 1953 | $header = pack('vv', $record, $length); |
1954 | 1954 | $data = pack('d', $margin); |
@@ -1964,10 +1964,10 @@ discard block |
||
1964 | 1964 | */ |
1965 | 1965 | private function writeMarginBottom() |
1966 | 1966 | { |
1967 | - $record = 0x0029; // Record identifier |
|
1968 | - $length = 0x0008; // Bytes to follow |
|
1967 | + $record = 0x0029; // Record identifier |
|
1968 | + $length = 0x0008; // Bytes to follow |
|
1969 | 1969 | |
1970 | - $margin = $this->phpSheet->getPageMargins()->getBottom(); // Margin in inches |
|
1970 | + $margin = $this->phpSheet->getPageMargins()->getBottom(); // Margin in inches |
|
1971 | 1971 | |
1972 | 1972 | $header = pack('vv', $record, $length); |
1973 | 1973 | $data = pack('d', $margin); |
@@ -1983,10 +1983,10 @@ discard block |
||
1983 | 1983 | */ |
1984 | 1984 | private function writePrintHeaders() |
1985 | 1985 | { |
1986 | - $record = 0x002a; // Record identifier |
|
1987 | - $length = 0x0002; // Bytes to follow |
|
1986 | + $record = 0x002a; // Record identifier |
|
1987 | + $length = 0x0002; // Bytes to follow |
|
1988 | 1988 | |
1989 | - $fPrintRwCol = $this->_print_headers; // Boolean flag |
|
1989 | + $fPrintRwCol = $this->_print_headers; // Boolean flag |
|
1990 | 1990 | |
1991 | 1991 | $header = pack('vv', $record, $length); |
1992 | 1992 | $data = pack('v', $fPrintRwCol); |
@@ -1999,10 +1999,10 @@ discard block |
||
1999 | 1999 | */ |
2000 | 2000 | private function writePrintGridlines() |
2001 | 2001 | { |
2002 | - $record = 0x002b; // Record identifier |
|
2003 | - $length = 0x0002; // Bytes to follow |
|
2002 | + $record = 0x002b; // Record identifier |
|
2003 | + $length = 0x0002; // Bytes to follow |
|
2004 | 2004 | |
2005 | - $fPrintGrid = $this->phpSheet->getPrintGridlines() ? 1 : 0; // Boolean flag |
|
2005 | + $fPrintGrid = $this->phpSheet->getPrintGridlines() ? 1 : 0; // Boolean flag |
|
2006 | 2006 | |
2007 | 2007 | $header = pack('vv', $record, $length); |
2008 | 2008 | $data = pack('v', $fPrintGrid); |
@@ -2015,10 +2015,10 @@ discard block |
||
2015 | 2015 | */ |
2016 | 2016 | private function writeGridset() |
2017 | 2017 | { |
2018 | - $record = 0x0082; // Record identifier |
|
2019 | - $length = 0x0002; // Bytes to follow |
|
2018 | + $record = 0x0082; // Record identifier |
|
2019 | + $length = 0x0002; // Bytes to follow |
|
2020 | 2020 | |
2021 | - $fGridSet = !$this->phpSheet->getPrintGridlines(); // Boolean flag |
|
2021 | + $fGridSet = !$this->phpSheet->getPrintGridlines(); // Boolean flag |
|
2022 | 2022 | |
2023 | 2023 | $header = pack('vv', $record, $length); |
2024 | 2024 | $data = pack('v', $fGridSet); |
@@ -2030,8 +2030,8 @@ discard block |
||
2030 | 2030 | */ |
2031 | 2031 | private function writeAutoFilterInfo() |
2032 | 2032 | { |
2033 | - $record = 0x009D; // Record identifier |
|
2034 | - $length = 0x0002; // Bytes to follow |
|
2033 | + $record = 0x009D; // Record identifier |
|
2034 | + $length = 0x0002; // Bytes to follow |
|
2035 | 2035 | |
2036 | 2036 | $rangeBounds = \PhpSpreadsheet\Cell::rangeBoundaries($this->phpSheet->getAutoFilter()->getRange()); |
2037 | 2037 | $iNumFilters = 1 + $rangeBounds[1][0] - $rangeBounds[0][0]; |
@@ -2050,11 +2050,11 @@ discard block |
||
2050 | 2050 | */ |
2051 | 2051 | private function writeGuts() |
2052 | 2052 | { |
2053 | - $record = 0x0080; // Record identifier |
|
2054 | - $length = 0x0008; // Bytes to follow |
|
2053 | + $record = 0x0080; // Record identifier |
|
2054 | + $length = 0x0008; // Bytes to follow |
|
2055 | 2055 | |
2056 | - $dxRwGut = 0x0000; // Size of row gutter |
|
2057 | - $dxColGut = 0x0000; // Size of col gutter |
|
2056 | + $dxRwGut = 0x0000; // Size of row gutter |
|
2057 | + $dxColGut = 0x0000; // Size of col gutter |
|
2058 | 2058 | |
2059 | 2059 | // determine maximum row outline level |
2060 | 2060 | $maxRowOutlineLevel = 0; |
@@ -2094,15 +2094,15 @@ discard block |
||
2094 | 2094 | */ |
2095 | 2095 | private function writeWsbool() |
2096 | 2096 | { |
2097 | - $record = 0x0081; // Record identifier |
|
2098 | - $length = 0x0002; // Bytes to follow |
|
2097 | + $record = 0x0081; // Record identifier |
|
2098 | + $length = 0x0002; // Bytes to follow |
|
2099 | 2099 | $grbit = 0x0000; |
2100 | 2100 | |
2101 | 2101 | // The only option that is of interest is the flag for fit to page. So we |
2102 | 2102 | // set all the options in one go. |
2103 | 2103 | // |
2104 | 2104 | // Set the option flags |
2105 | - $grbit |= 0x0001; // Auto page breaks visible |
|
2105 | + $grbit |= 0x0001; // Auto page breaks visible |
|
2106 | 2106 | if ($this->outlineStyle) { |
2107 | 2107 | $grbit |= 0x0020; // Auto outline styles |
2108 | 2108 | } |
@@ -2162,9 +2162,9 @@ discard block |
||
2162 | 2162 | array_shift($hbreaks); |
2163 | 2163 | } |
2164 | 2164 | |
2165 | - $record = 0x001b; // Record identifier |
|
2166 | - $cbrk = count($hbreaks); // Number of page breaks |
|
2167 | - $length = 2 + 6 * $cbrk; // Bytes to follow |
|
2165 | + $record = 0x001b; // Record identifier |
|
2166 | + $cbrk = count($hbreaks); // Number of page breaks |
|
2167 | + $length = 2 + 6 * $cbrk; // Bytes to follow |
|
2168 | 2168 | |
2169 | 2169 | $header = pack('vv', $record, $length); |
2170 | 2170 | $data = pack('v', $cbrk); |
@@ -2189,9 +2189,9 @@ discard block |
||
2189 | 2189 | array_shift($vbreaks); |
2190 | 2190 | } |
2191 | 2191 | |
2192 | - $record = 0x001a; // Record identifier |
|
2193 | - $cbrk = count($vbreaks); // Number of page breaks |
|
2194 | - $length = 2 + 6 * $cbrk; // Bytes to follow |
|
2192 | + $record = 0x001a; // Record identifier |
|
2193 | + $cbrk = count($vbreaks); // Number of page breaks |
|
2194 | + $length = 2 + 6 * $cbrk; // Bytes to follow |
|
2195 | 2195 | |
2196 | 2196 | $header = pack('vv', $record, $length); |
2197 | 2197 | $data = pack('v', $cbrk); |
@@ -2215,10 +2215,10 @@ discard block |
||
2215 | 2215 | return; |
2216 | 2216 | } |
2217 | 2217 | |
2218 | - $record = 0x0012; // Record identifier |
|
2219 | - $length = 0x0002; // Bytes to follow |
|
2218 | + $record = 0x0012; // Record identifier |
|
2219 | + $length = 0x0002; // Bytes to follow |
|
2220 | 2220 | |
2221 | - $fLock = 1; // Worksheet is protected |
|
2221 | + $fLock = 1; // Worksheet is protected |
|
2222 | 2222 | |
2223 | 2223 | $header = pack('vv', $record, $length); |
2224 | 2224 | $data = pack('v', $fLock); |
@@ -2284,10 +2284,10 @@ discard block |
||
2284 | 2284 | return; |
2285 | 2285 | } |
2286 | 2286 | |
2287 | - $record = 0x0013; // Record identifier |
|
2288 | - $length = 0x0002; // Bytes to follow |
|
2287 | + $record = 0x0013; // Record identifier |
|
2288 | + $length = 0x0002; // Bytes to follow |
|
2289 | 2289 | |
2290 | - $wPassword = hexdec($this->phpSheet->getProtection()->getPassword()); // Encoded password |
|
2290 | + $wPassword = hexdec($this->phpSheet->getProtection()->getPassword()); // Encoded password |
|
2291 | 2291 | |
2292 | 2292 | $header = pack('vv', $record, $length); |
2293 | 2293 | $data = pack('v', $wPassword); |
@@ -2382,8 +2382,8 @@ discard block |
||
2382 | 2382 | public function positionImage($col_start, $row_start, $x1, $y1, $width, $height) |
2383 | 2383 | { |
2384 | 2384 | // Initialise end cell to the same as the start cell |
2385 | - $col_end = $col_start; // Col containing lower right corner of object |
|
2386 | - $row_end = $row_start; // Row containing bottom right corner of object |
|
2385 | + $col_end = $col_start; // Col containing lower right corner of object |
|
2386 | + $row_end = $row_start; // Row containing bottom right corner of object |
|
2387 | 2387 | |
2388 | 2388 | // Zero the specified offset if greater than the cell dimensions |
2389 | 2389 | if ($x1 >= \PhpSpreadsheet\Shared\Excel5::sizeCol($this->phpSheet, \PhpSpreadsheet\Cell::stringFromColumnIndex($col_start))) { |
@@ -2448,33 +2448,33 @@ discard block |
||
2448 | 2448 | */ |
2449 | 2449 | private function writeObjPicture($colL, $dxL, $rwT, $dyT, $colR, $dxR, $rwB, $dyB) |
2450 | 2450 | { |
2451 | - $record = 0x005d; // Record identifier |
|
2452 | - $length = 0x003c; // Bytes to follow |
|
2453 | - |
|
2454 | - $cObj = 0x0001; // Count of objects in file (set to 1) |
|
2455 | - $OT = 0x0008; // Object type. 8 = Picture |
|
2456 | - $id = 0x0001; // Object ID |
|
2457 | - $grbit = 0x0614; // Option flags |
|
2458 | - |
|
2459 | - $cbMacro = 0x0000; // Length of FMLA structure |
|
2460 | - $Reserved1 = 0x0000; // Reserved |
|
2461 | - $Reserved2 = 0x0000; // Reserved |
|
2462 | - |
|
2463 | - $icvBack = 0x09; // Background colour |
|
2464 | - $icvFore = 0x09; // Foreground colour |
|
2465 | - $fls = 0x00; // Fill pattern |
|
2466 | - $fAuto = 0x00; // Automatic fill |
|
2467 | - $icv = 0x08; // Line colour |
|
2468 | - $lns = 0xff; // Line style |
|
2469 | - $lnw = 0x01; // Line weight |
|
2470 | - $fAutoB = 0x00; // Automatic border |
|
2471 | - $frs = 0x0000; // Frame style |
|
2472 | - $cf = 0x0009; // Image format, 9 = bitmap |
|
2473 | - $Reserved3 = 0x0000; // Reserved |
|
2474 | - $cbPictFmla = 0x0000; // Length of FMLA structure |
|
2475 | - $Reserved4 = 0x0000; // Reserved |
|
2476 | - $grbit2 = 0x0001; // Option flags |
|
2477 | - $Reserved5 = 0x0000; // Reserved |
|
2451 | + $record = 0x005d; // Record identifier |
|
2452 | + $length = 0x003c; // Bytes to follow |
|
2453 | + |
|
2454 | + $cObj = 0x0001; // Count of objects in file (set to 1) |
|
2455 | + $OT = 0x0008; // Object type. 8 = Picture |
|
2456 | + $id = 0x0001; // Object ID |
|
2457 | + $grbit = 0x0614; // Option flags |
|
2458 | + |
|
2459 | + $cbMacro = 0x0000; // Length of FMLA structure |
|
2460 | + $Reserved1 = 0x0000; // Reserved |
|
2461 | + $Reserved2 = 0x0000; // Reserved |
|
2462 | + |
|
2463 | + $icvBack = 0x09; // Background colour |
|
2464 | + $icvFore = 0x09; // Foreground colour |
|
2465 | + $fls = 0x00; // Fill pattern |
|
2466 | + $fAuto = 0x00; // Automatic fill |
|
2467 | + $icv = 0x08; // Line colour |
|
2468 | + $lns = 0xff; // Line style |
|
2469 | + $lnw = 0x01; // Line weight |
|
2470 | + $fAutoB = 0x00; // Automatic border |
|
2471 | + $frs = 0x0000; // Frame style |
|
2472 | + $cf = 0x0009; // Image format, 9 = bitmap |
|
2473 | + $Reserved3 = 0x0000; // Reserved |
|
2474 | + $cbPictFmla = 0x0000; // Length of FMLA structure |
|
2475 | + $Reserved4 = 0x0000; // Reserved |
|
2476 | + $grbit2 = 0x0001; // Option flags |
|
2477 | + $Reserved5 = 0x0000; // Reserved |
|
2478 | 2478 | |
2479 | 2479 | $header = pack('vv', $record, $length); |
2480 | 2480 | $data = pack('V', $cObj); |
@@ -2636,8 +2636,8 @@ discard block |
||
2636 | 2636 | return; |
2637 | 2637 | } |
2638 | 2638 | |
2639 | - $record = 0x00A0; // Record identifier |
|
2640 | - $length = 0x0004; // Bytes to follow |
|
2639 | + $record = 0x00A0; // Record identifier |
|
2640 | + $length = 0x0004; // Bytes to follow |
|
2641 | 2641 | |
2642 | 2642 | $header = pack('vv', $record, $length); |
2643 | 2643 | $data = pack('vv', $this->phpSheet->getSheetView()->getZoomScale(), 100); |
@@ -2682,7 +2682,7 @@ discard block |
||
2682 | 2682 | $nm = count($spOffsets) - 1; // number of shapes excluding first shape |
2683 | 2683 | for ($i = 1; $i <= $nm; ++$i) { |
2684 | 2684 | // MSODRAWING record |
2685 | - $record = 0x00EC; // Record identifier |
|
2685 | + $record = 0x00EC; // Record identifier |
|
2686 | 2686 | |
2687 | 2687 | // chunk of Escher stream for one shape |
2688 | 2688 | $dataChunk = substr($data, $spOffsets[$i - 1], $spOffsets[$i] - $spOffsets[$i - 1]); |
@@ -2760,20 +2760,20 @@ discard block |
||
2760 | 2760 | // Write data validations? |
2761 | 2761 | if (!empty($dataValidationCollection)) { |
2762 | 2762 | // DATAVALIDATIONS record |
2763 | - $record = 0x01B2; // Record identifier |
|
2764 | - $length = 0x0012; // Bytes to follow |
|
2763 | + $record = 0x01B2; // Record identifier |
|
2764 | + $length = 0x0012; // Bytes to follow |
|
2765 | 2765 | |
2766 | - $grbit = 0x0000; // Prompt box at cell, no cached validity data at DV records |
|
2767 | - $horPos = 0x00000000; // Horizontal position of prompt box, if fixed position |
|
2768 | - $verPos = 0x00000000; // Vertical position of prompt box, if fixed position |
|
2769 | - $objId = 0xFFFFFFFF; // Object identifier of drop down arrow object, or -1 if not visible |
|
2766 | + $grbit = 0x0000; // Prompt box at cell, no cached validity data at DV records |
|
2767 | + $horPos = 0x00000000; // Horizontal position of prompt box, if fixed position |
|
2768 | + $verPos = 0x00000000; // Vertical position of prompt box, if fixed position |
|
2769 | + $objId = 0xFFFFFFFF; // Object identifier of drop down arrow object, or -1 if not visible |
|
2770 | 2770 | |
2771 | 2771 | $header = pack('vv', $record, $length); |
2772 | 2772 | $data = pack('vVVVV', $grbit, $horPos, $verPos, $objId, count($dataValidationCollection)); |
2773 | 2773 | $this->append($header . $data); |
2774 | 2774 | |
2775 | 2775 | // DATAVALIDATION records |
2776 | - $record = 0x01BE; // Record identifier |
|
2776 | + $record = 0x01BE; // Record identifier |
|
2777 | 2777 | |
2778 | 2778 | foreach ($dataValidationCollection as $cellCoordinate => $dataValidation) { |
2779 | 2779 | // initialize record data |
@@ -2973,8 +2973,8 @@ discard block |
||
2973 | 2973 | */ |
2974 | 2974 | private function writePageLayoutView() |
2975 | 2975 | { |
2976 | - $record = 0x088B; // Record identifier |
|
2977 | - $length = 0x0010; // Bytes to follow |
|
2976 | + $record = 0x088B; // Record identifier |
|
2977 | + $length = 0x0010; // Bytes to follow |
|
2978 | 2978 | |
2979 | 2979 | $rt = 0x088B; // 2 |
2980 | 2980 | $grbitFrt = 0x0000; // 2 |
@@ -3005,7 +3005,7 @@ discard block |
||
3005 | 3005 | */ |
3006 | 3006 | private function writeCFRule(\PhpSpreadsheet\Style\Conditional $conditional) |
3007 | 3007 | { |
3008 | - $record = 0x01B1; // Record identifier |
|
3008 | + $record = 0x01B1; // Record identifier |
|
3009 | 3009 | |
3010 | 3010 | // $type : Type of the CF |
3011 | 3011 | // $operatorType : Comparison operator |
@@ -3125,43 +3125,43 @@ discard block |
||
3125 | 3125 | } |
3126 | 3126 | // Alignment |
3127 | 3127 | $flags = 0; |
3128 | - $flags |= (1 == $bAlignHz ? 0x00000001 : 0); |
|
3129 | - $flags |= (1 == $bAlignVt ? 0x00000002 : 0); |
|
3130 | - $flags |= (1 == $bAlignWrapTx ? 0x00000004 : 0); |
|
3131 | - $flags |= (1 == $bTxRotation ? 0x00000008 : 0); |
|
3128 | + $flags |= (1 == $bAlignHz ? 0x00000001 : 0); |
|
3129 | + $flags |= (1 == $bAlignVt ? 0x00000002 : 0); |
|
3130 | + $flags |= (1 == $bAlignWrapTx ? 0x00000004 : 0); |
|
3131 | + $flags |= (1 == $bTxRotation ? 0x00000008 : 0); |
|
3132 | 3132 | // Justify last line flag |
3133 | - $flags |= (1 == 1 ? 0x00000010 : 0); |
|
3134 | - $flags |= (1 == $bIndent ? 0x00000020 : 0); |
|
3135 | - $flags |= (1 == $bShrinkToFit ? 0x00000040 : 0); |
|
3133 | + $flags |= (1 == 1 ? 0x00000010 : 0); |
|
3134 | + $flags |= (1 == $bIndent ? 0x00000020 : 0); |
|
3135 | + $flags |= (1 == $bShrinkToFit ? 0x00000040 : 0); |
|
3136 | 3136 | // Default |
3137 | - $flags |= (1 == 1 ? 0x00000080 : 0); |
|
3137 | + $flags |= (1 == 1 ? 0x00000080 : 0); |
|
3138 | 3138 | // Protection |
3139 | - $flags |= (1 == $bProtLocked ? 0x00000100 : 0); |
|
3140 | - $flags |= (1 == $bProtHidden ? 0x00000200 : 0); |
|
3139 | + $flags |= (1 == $bProtLocked ? 0x00000100 : 0); |
|
3140 | + $flags |= (1 == $bProtHidden ? 0x00000200 : 0); |
|
3141 | 3141 | // Border |
3142 | - $flags |= (1 == $bBorderLeft ? 0x00000400 : 0); |
|
3143 | - $flags |= (1 == $bBorderRight ? 0x00000800 : 0); |
|
3144 | - $flags |= (1 == $bBorderTop ? 0x00001000 : 0); |
|
3142 | + $flags |= (1 == $bBorderLeft ? 0x00000400 : 0); |
|
3143 | + $flags |= (1 == $bBorderRight ? 0x00000800 : 0); |
|
3144 | + $flags |= (1 == $bBorderTop ? 0x00001000 : 0); |
|
3145 | 3145 | $flags |= (1 == $bBorderBottom ? 0x00002000 : 0); |
3146 | - $flags |= (1 == 1 ? 0x00004000 : 0); // Top left to Bottom right border |
|
3147 | - $flags |= (1 == 1 ? 0x00008000 : 0); // Bottom left to Top right border |
|
3146 | + $flags |= (1 == 1 ? 0x00004000 : 0); // Top left to Bottom right border |
|
3147 | + $flags |= (1 == 1 ? 0x00008000 : 0); // Bottom left to Top right border |
|
3148 | 3148 | // Pattern |
3149 | - $flags |= (1 == $bFillStyle ? 0x00010000 : 0); |
|
3150 | - $flags |= (1 == $bFillColor ? 0x00020000 : 0); |
|
3151 | - $flags |= (1 == $bFillColorBg ? 0x00040000 : 0); |
|
3152 | - $flags |= (1 == 1 ? 0x00380000 : 0); |
|
3149 | + $flags |= (1 == $bFillStyle ? 0x00010000 : 0); |
|
3150 | + $flags |= (1 == $bFillColor ? 0x00020000 : 0); |
|
3151 | + $flags |= (1 == $bFillColorBg ? 0x00040000 : 0); |
|
3152 | + $flags |= (1 == 1 ? 0x00380000 : 0); |
|
3153 | 3153 | // Font |
3154 | - $flags |= (1 == $bFormatFont ? 0x04000000 : 0); |
|
3154 | + $flags |= (1 == $bFormatFont ? 0x04000000 : 0); |
|
3155 | 3155 | // Alignment: |
3156 | - $flags |= (1 == $bFormatAlign ? 0x08000000 : 0); |
|
3156 | + $flags |= (1 == $bFormatAlign ? 0x08000000 : 0); |
|
3157 | 3157 | // Border |
3158 | 3158 | $flags |= (1 == $bFormatBorder ? 0x10000000 : 0); |
3159 | 3159 | // Pattern |
3160 | - $flags |= (1 == $bFormatFill ? 0x20000000 : 0); |
|
3160 | + $flags |= (1 == $bFormatFill ? 0x20000000 : 0); |
|
3161 | 3161 | // Protection |
3162 | - $flags |= (1 == $bFormatProt ? 0x40000000 : 0); |
|
3162 | + $flags |= (1 == $bFormatProt ? 0x40000000 : 0); |
|
3163 | 3163 | // Text direction |
3164 | - $flags |= (1 == 0 ? 0x80000000 : 0); |
|
3164 | + $flags |= (1 == 0 ? 0x80000000 : 0); |
|
3165 | 3165 | |
3166 | 3166 | // Data Blocks |
3167 | 3167 | if ($bFormatFont == 1) { |
@@ -3406,11 +3406,11 @@ discard block |
||
3406 | 3406 | // Options flags for modified font attributes |
3407 | 3407 | $optionsFlags = 0; |
3408 | 3408 | $optionsFlagsBold = ($conditional->getStyle()->getFont()->getBold() == null ? 1 : 0); |
3409 | - $optionsFlags |= (1 == $optionsFlagsBold ? 0x00000002 : 0); |
|
3410 | - $optionsFlags |= (1 == 1 ? 0x00000008 : 0); |
|
3411 | - $optionsFlags |= (1 == 1 ? 0x00000010 : 0); |
|
3412 | - $optionsFlags |= (1 == 0 ? 0x00000020 : 0); |
|
3413 | - $optionsFlags |= (1 == 1 ? 0x00000080 : 0); |
|
3409 | + $optionsFlags |= (1 == $optionsFlagsBold ? 0x00000002 : 0); |
|
3410 | + $optionsFlags |= (1 == 1 ? 0x00000008 : 0); |
|
3411 | + $optionsFlags |= (1 == 1 ? 0x00000010 : 0); |
|
3412 | + $optionsFlags |= (1 == 0 ? 0x00000020 : 0); |
|
3413 | + $optionsFlags |= (1 == 1 ? 0x00000080 : 0); |
|
3414 | 3414 | $dataBlockFont .= pack('V', $optionsFlags); |
3415 | 3415 | // Escapement type |
3416 | 3416 | $dataBlockFont .= pack('V', $fontEscapement); |
@@ -3781,10 +3781,10 @@ discard block |
||
3781 | 3781 | break; |
3782 | 3782 | case \PhpSpreadsheet\Style\Fill::FILL_GRADIENT_LINEAR: |
3783 | 3783 | $blockFillPatternStyle = 0x00; |
3784 | - break; // does not exist in BIFF8 |
|
3784 | + break; // does not exist in BIFF8 |
|
3785 | 3785 | case \PhpSpreadsheet\Style\Fill::FILL_GRADIENT_PATH: |
3786 | 3786 | $blockFillPatternStyle = 0x00; |
3787 | - break; // does not exist in BIFF8 |
|
3787 | + break; // does not exist in BIFF8 |
|
3788 | 3788 | default: |
3789 | 3789 | $blockFillPatternStyle = 0x00; |
3790 | 3790 | break; |
@@ -4181,8 +4181,8 @@ discard block |
||
4181 | 4181 | */ |
4182 | 4182 | private function writeCFHeader() |
4183 | 4183 | { |
4184 | - $record = 0x01B0; // Record identifier |
|
4185 | - $length = 0x0016; // Bytes to follow |
|
4184 | + $record = 0x01B0; // Record identifier |
|
4185 | + $length = 0x0016; // Bytes to follow |
|
4186 | 4186 | |
4187 | 4187 | $numColumnMin = null; |
4188 | 4188 | $numColumnMax = null; |
@@ -51,12 +51,12 @@ discard block |
||
51 | 51 | // Set document properties |
52 | 52 | echo date('H:i:s') , " Set document properties" , EOL; |
53 | 53 | $objPHPExcel->getProperties()->setCreator("Maarten Balliauw") |
54 | - ->setLastModifiedBy("Maarten Balliauw") |
|
55 | - ->setTitle("Office 2007 XLSX Test Document") |
|
56 | - ->setSubject("Office 2007 XLSX Test Document") |
|
57 | - ->setDescription("Test document for Office 2007 XLSX, generated using PHP classes.") |
|
58 | - ->setKeywords("office 2007 openxml php") |
|
59 | - ->setCategory("Test result file"); |
|
54 | + ->setLastModifiedBy("Maarten Balliauw") |
|
55 | + ->setTitle("Office 2007 XLSX Test Document") |
|
56 | + ->setSubject("Office 2007 XLSX Test Document") |
|
57 | + ->setDescription("Test document for Office 2007 XLSX, generated using PHP classes.") |
|
58 | + ->setKeywords("office 2007 openxml php") |
|
59 | + ->setCategory("Test result file"); |
|
60 | 60 | |
61 | 61 | // Set default font |
62 | 62 | echo date('H:i:s') , " Set default font" , EOL; |
@@ -71,88 +71,88 @@ discard block |
||
71 | 71 | // Add some data, resembling some different data types |
72 | 72 | echo date('H:i:s') , " Add some data" , EOL; |
73 | 73 | $objPHPExcel->getActiveSheet()->setCellValue('A1', 'String value:') |
74 | - ->setCellValue('B1', 'Mark Baker'); |
|
74 | + ->setCellValue('B1', 'Mark Baker'); |
|
75 | 75 | |
76 | 76 | $objPHPExcel->getActiveSheet()->setCellValue('A2', 'Numeric value #1:') |
77 | - ->setCellValue('B2', 12345); |
|
77 | + ->setCellValue('B2', 12345); |
|
78 | 78 | |
79 | 79 | $objPHPExcel->getActiveSheet()->setCellValue('A3', 'Numeric value #2:') |
80 | - ->setCellValue('B3', -12.345); |
|
80 | + ->setCellValue('B3', -12.345); |
|
81 | 81 | |
82 | 82 | $objPHPExcel->getActiveSheet()->setCellValue('A4', 'Numeric value #3:') |
83 | - ->setCellValue('B4', .12345); |
|
83 | + ->setCellValue('B4', .12345); |
|
84 | 84 | |
85 | 85 | $objPHPExcel->getActiveSheet()->setCellValue('A5', 'Numeric value #4:') |
86 | - ->setCellValue('B5', '12345'); |
|
86 | + ->setCellValue('B5', '12345'); |
|
87 | 87 | |
88 | 88 | $objPHPExcel->getActiveSheet()->setCellValue('A6', 'Numeric value #5:') |
89 | - ->setCellValue('B6', '1.2345'); |
|
89 | + ->setCellValue('B6', '1.2345'); |
|
90 | 90 | |
91 | 91 | $objPHPExcel->getActiveSheet()->setCellValue('A7', 'Numeric value #6:') |
92 | - ->setCellValue('B7', '.12345'); |
|
92 | + ->setCellValue('B7', '.12345'); |
|
93 | 93 | |
94 | 94 | $objPHPExcel->getActiveSheet()->setCellValue('A8', 'Numeric value #7:') |
95 | - ->setCellValue('B8', '1.234e-5'); |
|
95 | + ->setCellValue('B8', '1.234e-5'); |
|
96 | 96 | |
97 | 97 | $objPHPExcel->getActiveSheet()->setCellValue('A9', 'Numeric value #8:') |
98 | - ->setCellValue('B9', '-1.234e+5'); |
|
98 | + ->setCellValue('B9', '-1.234e+5'); |
|
99 | 99 | |
100 | 100 | $objPHPExcel->getActiveSheet()->setCellValue('A10', 'Boolean value:') |
101 | - ->setCellValue('B10', 'TRUE'); |
|
101 | + ->setCellValue('B10', 'TRUE'); |
|
102 | 102 | |
103 | 103 | $objPHPExcel->getActiveSheet()->setCellValue('A11', 'Percentage value #1:') |
104 | - ->setCellValue('B11', '10%'); |
|
104 | + ->setCellValue('B11', '10%'); |
|
105 | 105 | |
106 | 106 | $objPHPExcel->getActiveSheet()->setCellValue('A12', 'Percentage value #2:') |
107 | - ->setCellValue('B12', '12.5%'); |
|
107 | + ->setCellValue('B12', '12.5%'); |
|
108 | 108 | |
109 | 109 | $objPHPExcel->getActiveSheet()->setCellValue('A13', 'Fraction value #1:') |
110 | - ->setCellValue('B13', '-1/2'); |
|
110 | + ->setCellValue('B13', '-1/2'); |
|
111 | 111 | |
112 | 112 | $objPHPExcel->getActiveSheet()->setCellValue('A14', 'Fraction value #2:') |
113 | - ->setCellValue('B14', '3 1/2'); |
|
113 | + ->setCellValue('B14', '3 1/2'); |
|
114 | 114 | |
115 | 115 | $objPHPExcel->getActiveSheet()->setCellValue('A15', 'Fraction value #3:') |
116 | - ->setCellValue('B15', '-12 3/4'); |
|
116 | + ->setCellValue('B15', '-12 3/4'); |
|
117 | 117 | |
118 | 118 | $objPHPExcel->getActiveSheet()->setCellValue('A16', 'Fraction value #4:') |
119 | - ->setCellValue('B16', '13/4'); |
|
119 | + ->setCellValue('B16', '13/4'); |
|
120 | 120 | |
121 | 121 | $objPHPExcel->getActiveSheet()->setCellValue('A17', 'Currency value #1:') |
122 | - ->setCellValue('B17', '$12345'); |
|
122 | + ->setCellValue('B17', '$12345'); |
|
123 | 123 | |
124 | 124 | $objPHPExcel->getActiveSheet()->setCellValue('A18', 'Currency value #2:') |
125 | - ->setCellValue('B18', '$12345.67'); |
|
125 | + ->setCellValue('B18', '$12345.67'); |
|
126 | 126 | |
127 | 127 | $objPHPExcel->getActiveSheet()->setCellValue('A19', 'Currency value #3:') |
128 | - ->setCellValue('B19', '$12,345.67'); |
|
128 | + ->setCellValue('B19', '$12,345.67'); |
|
129 | 129 | |
130 | 130 | $objPHPExcel->getActiveSheet()->setCellValue('A20', 'Date value #1:') |
131 | - ->setCellValue('B20', '21 December 1983'); |
|
131 | + ->setCellValue('B20', '21 December 1983'); |
|
132 | 132 | |
133 | 133 | $objPHPExcel->getActiveSheet()->setCellValue('A21', 'Date value #2:') |
134 | - ->setCellValue('B21', '19-Dec-1960'); |
|
134 | + ->setCellValue('B21', '19-Dec-1960'); |
|
135 | 135 | |
136 | 136 | $objPHPExcel->getActiveSheet()->setCellValue('A22', 'Date value #3:') |
137 | - ->setCellValue('B22', '07/12/1982'); |
|
137 | + ->setCellValue('B22', '07/12/1982'); |
|
138 | 138 | |
139 | 139 | $objPHPExcel->getActiveSheet()->setCellValue('A23', 'Date value #4:') |
140 | - ->setCellValue('B23', '24-11-1950'); |
|
140 | + ->setCellValue('B23', '24-11-1950'); |
|
141 | 141 | |
142 | 142 | $objPHPExcel->getActiveSheet()->setCellValue('A24', 'Date value #5:') |
143 | - ->setCellValue('B24', '17-Mar'); |
|
143 | + ->setCellValue('B24', '17-Mar'); |
|
144 | 144 | |
145 | 145 | $objPHPExcel->getActiveSheet()->setCellValue('A25', 'Time value #1:') |
146 | - ->setCellValue('B25', '01:30'); |
|
146 | + ->setCellValue('B25', '01:30'); |
|
147 | 147 | |
148 | 148 | $objPHPExcel->getActiveSheet()->setCellValue('A26', 'Time value #2:') |
149 | - ->setCellValue('B26', '01:30:15'); |
|
149 | + ->setCellValue('B26', '01:30:15'); |
|
150 | 150 | |
151 | 151 | $objPHPExcel->getActiveSheet()->setCellValue('A27', 'Date/Time value:') |
152 | - ->setCellValue('B27', '19-Dec-1960 01:30'); |
|
152 | + ->setCellValue('B27', '19-Dec-1960 01:30'); |
|
153 | 153 | |
154 | 154 | $objPHPExcel->getActiveSheet()->setCellValue('A28', 'Formula:') |
155 | - ->setCellValue('B28', '=SUM(B2:B9)'); |
|
155 | + ->setCellValue('B28', '=SUM(B2:B9)'); |
|
156 | 156 | |
157 | 157 | // Rename worksheet |
158 | 158 | echo date('H:i:s') , " Rename worksheet" , EOL; |
@@ -30,26 +30,26 @@ discard block |
||
30 | 30 | ini_set('display_errors', TRUE); |
31 | 31 | ini_set('display_startup_errors', TRUE); |
32 | 32 | |
33 | -define('EOL',(PHP_SAPI == 'cli') ? PHP_EOL : '<br />'); |
|
33 | +define('EOL', (PHP_SAPI == 'cli') ? PHP_EOL : '<br />'); |
|
34 | 34 | |
35 | 35 | /** PHPExcel */ |
36 | 36 | require_once dirname(__FILE__) . '/../src/Bootstrap.php'; |
37 | 37 | |
38 | 38 | |
39 | 39 | // Set timezone |
40 | -echo date('H:i:s') , " Set timezone" , EOL; |
|
40 | +echo date('H:i:s'), " Set timezone", EOL; |
|
41 | 41 | date_default_timezone_set('UTC'); |
42 | 42 | |
43 | 43 | // Set value binder |
44 | -echo date('H:i:s') , " Set value binder" , EOL; |
|
45 | -\PHPExcel\Cell::setValueBinder( new \PHPExcel\Cell\AdvancedValueBinder() ); |
|
44 | +echo date('H:i:s'), " Set value binder", EOL; |
|
45 | +\PHPExcel\Cell::setValueBinder(new \PHPExcel\Cell\AdvancedValueBinder()); |
|
46 | 46 | |
47 | 47 | // Create new PHPExcel object |
48 | -echo date('H:i:s') , " Create new PHPExcel object" , EOL; |
|
48 | +echo date('H:i:s'), " Create new PHPExcel object", EOL; |
|
49 | 49 | $objPHPExcel = new \PHPExcel\Spreadsheet(); |
50 | 50 | |
51 | 51 | // Set document properties |
52 | -echo date('H:i:s') , " Set document properties" , EOL; |
|
52 | +echo date('H:i:s'), " Set document properties", EOL; |
|
53 | 53 | $objPHPExcel->getProperties()->setCreator("Maarten Balliauw") |
54 | 54 | ->setLastModifiedBy("Maarten Balliauw") |
55 | 55 | ->setTitle("Office 2007 XLSX Test Document") |
@@ -59,17 +59,17 @@ discard block |
||
59 | 59 | ->setCategory("Test result file"); |
60 | 60 | |
61 | 61 | // Set default font |
62 | -echo date('H:i:s') , " Set default font" , EOL; |
|
62 | +echo date('H:i:s'), " Set default font", EOL; |
|
63 | 63 | $objPHPExcel->getActiveSheet()->getDefaultStyle()->getFont()->setName('Arial'); |
64 | 64 | $objPHPExcel->getActiveSheet()->getDefaultStyle()->getFont()->setSize(10); |
65 | 65 | |
66 | 66 | // Set column widths |
67 | -echo date('H:i:s') , " Set column widths" , EOL; |
|
67 | +echo date('H:i:s'), " Set column widths", EOL; |
|
68 | 68 | $objPHPExcel->getActiveSheet()->getColumnDimension('A')->setAutoSize(true); |
69 | 69 | $objPHPExcel->getActiveSheet()->getColumnDimension('B')->setWidth(14); |
70 | 70 | |
71 | 71 | // Add some data, resembling some different data types |
72 | -echo date('H:i:s') , " Add some data" , EOL; |
|
72 | +echo date('H:i:s'), " Add some data", EOL; |
|
73 | 73 | $objPHPExcel->getActiveSheet()->setCellValue('A1', 'String value:') |
74 | 74 | ->setCellValue('B1', 'Mark Baker'); |
75 | 75 | |
@@ -155,7 +155,7 @@ discard block |
||
155 | 155 | ->setCellValue('B28', '=SUM(B2:B9)'); |
156 | 156 | |
157 | 157 | // Rename worksheet |
158 | -echo date('H:i:s') , " Rename worksheet" , EOL; |
|
158 | +echo date('H:i:s'), " Rename worksheet", EOL; |
|
159 | 159 | $objPHPExcel->getActiveSheet()->setTitle('Advanced value binder'); |
160 | 160 | |
161 | 161 | |
@@ -164,20 +164,20 @@ discard block |
||
164 | 164 | |
165 | 165 | |
166 | 166 | // Save Excel 2007 file |
167 | -echo date('H:i:s') , " Write to Excel2007 format" , EOL; |
|
167 | +echo date('H:i:s'), " Write to Excel2007 format", EOL; |
|
168 | 168 | $objWriter = \PHPExcel\IOFactory::createWriter($objPHPExcel, 'Excel2007'); |
169 | 169 | $objWriter->save(str_replace('.php', '.xlsx', __FILE__)); |
170 | -echo date('H:i:s') , " File written to " , str_replace('.php', '.xlsx', pathinfo(__FILE__, PATHINFO_BASENAME)) , EOL; |
|
170 | +echo date('H:i:s'), " File written to ", str_replace('.php', '.xlsx', pathinfo(__FILE__, PATHINFO_BASENAME)), EOL; |
|
171 | 171 | // Save Excel5 file |
172 | -echo date('H:i:s') , " Write to Excel5 format" , EOL; |
|
172 | +echo date('H:i:s'), " Write to Excel5 format", EOL; |
|
173 | 173 | $objWriter = \PHPExcel\IOFactory::createWriter($objPHPExcel, 'Excel5'); |
174 | 174 | $objWriter->save(str_replace('.php', '.xls', __FILE__)); |
175 | -echo date('H:i:s') , " File written to " , str_replace('.php', '.xls', pathinfo(__FILE__, PATHINFO_BASENAME)) , EOL; |
|
175 | +echo date('H:i:s'), " File written to ", str_replace('.php', '.xls', pathinfo(__FILE__, PATHINFO_BASENAME)), EOL; |
|
176 | 176 | |
177 | 177 | |
178 | 178 | // Echo memory peak usage |
179 | -echo date('H:i:s') , " Peak memory usage: " , (memory_get_peak_usage(true) / 1024 / 1024) , " MB" , EOL; |
|
179 | +echo date('H:i:s'), " Peak memory usage: ", (memory_get_peak_usage(true) / 1024 / 1024), " MB", EOL; |
|
180 | 180 | |
181 | 181 | // Echo done |
182 | -echo date('H:i:s') , " Done writing file" , EOL; |
|
183 | -echo 'File has been created in ' , getcwd() , EOL; |
|
182 | +echo date('H:i:s'), " Done writing file", EOL; |
|
183 | +echo 'File has been created in ', getcwd(), EOL; |
@@ -34,12 +34,12 @@ discard block |
||
34 | 34 | require_once dirname(__FILE__) . '/../Classes/PHPExcel/IOFactory.php'; |
35 | 35 | |
36 | 36 | |
37 | -echo date('H:i:s') , " Load from XML file" , PHP_EOL; |
|
37 | +echo date('H:i:s'), " Load from XML file", PHP_EOL; |
|
38 | 38 | $inputFileName = "XMLTest.xml"; |
39 | 39 | |
40 | 40 | /** Identify the type of $inputFileName **/ |
41 | 41 | $inputFileType = \PHPExcel\IOFactory::identify($inputFileName); |
42 | -echo 'Loading ' , $inputFileName , ' using ' , $inputFileType , " Reader" , PHP_EOL; |
|
42 | +echo 'Loading ', $inputFileName, ' using ', $inputFileType, " Reader", PHP_EOL; |
|
43 | 43 | |
44 | 44 | /** Create a new Reader of the type that has been identified **/ |
45 | 45 | $objReader = \PHPExcel\IOFactory::createReader($inputFileType); |
@@ -47,14 +47,14 @@ discard block |
||
47 | 47 | $objPHPExcel = $objReader->load($inputFileName); |
48 | 48 | |
49 | 49 | |
50 | -echo date('H:i:s') , " Write to Excel2007 format" , PHP_EOL; |
|
50 | +echo date('H:i:s'), " Write to Excel2007 format", PHP_EOL; |
|
51 | 51 | $objWriter = \PHPExcel\IOFactory::createWriter($objPHPExcel, 'Excel2007'); |
52 | 52 | $objWriter->save(str_replace('.php', '.xlsx', __FILE__)); |
53 | -echo date('H:i:s') , " File written to " , str_replace('.php', '.xlsx', __FILE__) , PHP_EOL; |
|
53 | +echo date('H:i:s'), " File written to ", str_replace('.php', '.xlsx', __FILE__), PHP_EOL; |
|
54 | 54 | |
55 | 55 | |
56 | 56 | // Echo memory peak usage |
57 | -echo date('H:i:s') , " Peak memory usage: " , (memory_get_peak_usage(true) / 1024 / 1024) , " MB" , PHP_EOL; |
|
57 | +echo date('H:i:s'), " Peak memory usage: ", (memory_get_peak_usage(true) / 1024 / 1024), " MB", PHP_EOL; |
|
58 | 58 | |
59 | 59 | // Echo done |
60 | -echo date('H:i:s') , " Done writing file" , PHP_EOL; |
|
60 | +echo date('H:i:s'), " Done writing file", PHP_EOL; |