public function getData(bool $flatten = false, callable $cellToValue = null)
    {
        $copy = array();
        for ($row = 0; $row < $this->rows; $row++) {
            if (!$flatten) {
                $copy[$row] = array();
            }
            foreach ($this->cells[$row] as $cell) {
                $value = $cellToValue ? $cellToValue($cell) : $cell;
                if ($flatten && $value === false) {
                    // skip
                } elseif ($flatten) {
                    $copy[] = $value;
                } else {
                    $copy[$row][] = $value;
                }
            }
        }
        return $copy;
    }