I'm going to export all of my data in mySQL using PHPExcel with CSV Format. Here is my code:

```
function exportHartatoCSV() {
    $memberid = $this->input->post('memberid');
    $tahun = $this->input->post('tahunpajak');

    $this->db->where('taxYear', $tahun);
    $this->db->where('memberID', $memberid);
    $query = $this->db->get('list_harta');

    $this->load->library("excel");

    $objPHPExcel = new PHPExcel();

    $objPHPExcel->setActiveSheetIndex(0)
                ->setCellValue('A1', 'Tahun Pajak')
                ->setCellValue('B1', 'Pembetulan')
                ->setCellValue('C1', 'Kode Harta')
                ->setCellValue('D1', 'Jenis Harta')
                ->setCellValue('E1', 'Tahun Perolehan')
                ->setCellValue('F1', 'Harga Perolehan')
                ->setCellValue('G1', 'Keterangan');

    $row = 2;

    $workbookName = $this->MemberModel->getNPWP($memberid);

    header('Content-Type: application/vnd.ms-excel');
    header('Content-Disposition: attachment;filename="'.$workbookName.'.csv"');
    header('Cache-Control: max-age=0');

    $objWriter = PHPExcel_IOFactory::createWriter($objPHPExcel, 'CSV');

    $objWriter->setDelimiter("\t");
    $objWriter->setEnclosure('');

    $total = 0;

    foreach ($query->result() as $key) {
        $objPHPExcel->getActiveSheet()->setCellValue('A'.$row, $key->taxYear);
        $objPHPExcel->getActiveSheet()->setCellValue('B'.$row, $key->pembetulan);
        $objPHPExcel->getActiveSheet()->setCellValue('C'.$row, $key->hartaID);
        $objPHPExcel->getActiveSheet()->setCellValue('D'.$row, $key->hartaName);
        $objPHPExcel->getActiveSheet()->setCellValue('E'.$row, $key->hartaYear);
        $objPHPExcel->getActiveSheet()->setCellValue('F'.$row, $key->hartaPrice);
        $objPHPExcel->getActiveSheet()->setCellValue('G'.$row, $key->hartaDesc);
        $total += $key->hartaPrice;
        $row++;
    }

    $objPHPExcel->getActiveSheet()->setCellValue('E'.$row, "Total Harta:");
    $objPHPExcel->getActiveSheet()->setCellValue('F'.$row, $total);

    $objWriter->save('php://output');
}

```

I want to change the delimiter from `,` to tab (like writing data to the next column. But it doesn't work. The strings are stick to each other. The output is like this:

[Output](https://i.stack.imgur.com/VhVc7.png)

But I want the output is like this:

[Expected Output](https://i.stack.imgur.com/BjF02.png)

**What I really want is a normal-looking excel table, but with .csv format.**