protected function calculateValue() { if (strlen($this->parsed) > 1 && $this->parsed[0] == '=') { $expr = substr($this->parsed, 1); $subcell = new SpreadSheetCell($this->connection, $this->sheetid, $expr, $this->prefix, $this->db_type); if ($subcell->isIncorrect() === false) { $expr = $subcell->getCalculatedValue(); } else { $expr = $this->replaceCells($expr); $math = new Math(); $expr = $math->calculate($expr); } $this->calc = $expr; } else { $this->calc = $this->parsed; } }
public function isCell($coord) { $cell = new SpreadSheetCell($this->connection, $this->sheetid, $coord, $this->prefix); if ($cell->isIncorrect()) { return false; } return $cell; }