public function constructWriter($filetype)
{
$filetype = strtoupper($filetype);
if (!in_array($filetype, $this->validWriterTypes)) {
throw new \Exception('Filetype ' . $filetype . ' is not supported', SimpleExcelException::FILETYPE_NOT_SUPPORTED);
}
$writer_class = 'SimpleExcel\\Writer\\' . $filetype . 'Writer';
$this->writer = new $writer_class();
}