public function getColumn($col_num, $val_only = TRUE)
{
$col_arr = array();
if (!$this->isColumnExists($col_num)) {
throw new \Exception('Column ' . $col_num . ' doesn\'t exist', SimpleExcelException::COLUMN_NOT_FOUND);
}
// get the specified column within every row
foreach ($this->table_arr['table_contents'] as $row) {
if ($row['row_contents']) {
if (!$val_only) {
array_push($col_arr, $row['row_contents'][$col_num - 1]);
} else {
array_push($col_arr, $row['row_contents'][$col_num - 1]['value']);
}
} else {
array_push($col_arr, "");
}
}
// return the array
return $col_arr;
}