<?php
$nama = str_ireplace(" ", "_", $this->data->set->modul);
$filename = $nama.".xls";
header('Content-type: application/ms-excel');
header('Content-Disposition: attachment; filename='.$filename);

echo $this->data->data;