I am able to download excel sheet in csv format using dbutil(), the data is storing directly into sheet from query. now here i have column with data 1 and 0, 1 for active and 0 for inactive. here instead of 1 and 0, and display 1 as active and 0 as inactive in sheet. can somebody help. thanks in avdance. model code is
$this->load->dbutil();
$this->load->helper('file');
$this->load->helper('download');
$delimiters = ",";
$newline = "
";
$filename = 'Customer_list-'.date("d-m-Y,h:i:s").'.csv';
$this->db->select('company_name as Company_name, contact_no as Contact_number, activation_status as STATUS_0_Inactive_1_Active, DATE_FORMAT(added_on, "%m-%d-%Y") as Customer_since');
$this->db->from('cpro_company_tbl');
$this->db->where('activation_status !=', 5);
$exscldata = $this->db->get();
$dexcel = $this->dbutil->csv_from_result($exscldata, $delimiters, $newline);
force_download($filename, $dexcel);
controller code is
$excelfile = $this->Company_model->download_excelfile_comp_db();