public function getField($val_only = TRUE)
{
if (!$this->isFieldExists()) {
throw new \Exception('Field is not set', SimpleExcelException::FIELD_NOT_FOUND);
}
if ($val_only) {
$field = array();
foreach ($this->table_arr['table_contents'] as $row) {
$cells = array();
if ($row['row_contents']) {
foreach ($row['row_contents'] as $cell) {
array_push($cells, $cell['value']);
}
}
array_push($field, $cells);
}
return $field;
} else {
return $this->table_arr;
}
}