| Conditions | 1 |
| Paths | 1 |
| Total Lines | 26 |
| Code Lines | 16 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 3 | ||
| Bugs | 0 | Features | 0 |
| 1 | <?php |
||
| 18 | public function getData($row, $col, $formula, $format) |
||
| 19 | { |
||
| 20 | // Excel normally stores the last calculated value of the formula in $num. |
||
| 21 | // Clearly we are not in a position to calculate this a priori. Instead |
||
| 22 | // we set $num to zero and set the option flags in $grbit to ensure |
||
| 23 | // automatic calculation of the formula when the file is opened. |
||
| 24 | $num = 0x00; // Current value of formula |
||
| 25 | $grbit = 0x03; // Option flags |
||
| 26 | $unknown = 0x0000; // Must be zero |
||
| 27 | |||
| 28 | $formlen = strlen($formula); |
||
| 29 | |||
| 30 | $data = pack( |
||
| 31 | "vvvdvVv", |
||
| 32 | $row, |
||
| 33 | $col, |
||
| 34 | $this->xf($format), |
||
| 35 | $num, |
||
| 36 | $grbit, |
||
| 37 | $unknown, |
||
| 38 | $formlen |
||
| 39 | ); |
||
| 40 | $data .= $formula; |
||
| 41 | |||
| 42 | return $this->getFullRecord($data); |
||
| 43 | } |
||
| 44 | } |
||
| 45 |