Restore reference to calculation engine

This commit is contained in:
Adrien Crivelli 2017-12-20 00:20:16 +09:00
parent cfcafd3e73
commit d383bc356c
No known key found for this signature in database
GPG Key ID: B182FD79DC6DE92E
1 changed files with 5 additions and 6 deletions

View File

@ -239,20 +239,19 @@ using the `getValue()` method.
``` php ``` php
// Get the value fom cell A1 // Get the value fom cell A1
$cellValue = $spreadsheet->getActiveSheet()->getCell('A1') $cellValue = $spreadsheet->getActiveSheet()->getCell('A1')->getValue();
->getValue();
``` ```
This will retrieve the raw, unformatted value contained in the cell. This will retrieve the raw, unformatted value contained in the cell.
If a cell contains a formula, and you need to retrieve the calculated If a cell contains a formula, and you need to retrieve the calculated
value rather than the formula itself, then use the cell's value rather than the formula itself, then use the cell's
`getCalculatedValue()` method. This is further explained in . `getCalculatedValue()` method. This is further explained in
[the calculation engine](./calculation-engine.md).
``` php ``` php
// Get the value fom cell A4 // Get the value fom cell A4
$cellValue = $spreadsheet->getActiveSheet()->getCell('A4') $cellValue = $spreadsheet->getActiveSheet()->getCell('A4')->getCalculatedValue();
->getCalculatedValue();
``` ```
Alternatively, if you want to see the value with any cell formatting Alternatively, if you want to see the value with any cell formatting
@ -288,7 +287,7 @@ $cellValue = $spreadsheet->getActiveSheet()->getCellByColumnAndRow(2, 5)->getVal
``` ```
If you need the calculated value of a cell, use the following code. This If you need the calculated value of a cell, use the following code. This
is further explained in . is further explained in [the calculation engine](./calculation-engine.md).
``` php ``` php
// Get the value fom cell A4 // Get the value fom cell A4