Codeigniter编写excel文件

I have the following view file

<html>
<head>
    <meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
</head>
<body>
<table border="1" align="center">
    <thead>
        <tr>
                <th>TransactionDate</th>
                <th>SettlementRefNo</th>
                <th>TransactionRefNo</th>
                <th>CustomerName</th>
                <th>TransactionAmount</th>
                <th>TDR</th>
                <th>ServiceTax</th>
                <th>FinalSettledAmount</th>
                <th>MerchantName</th>
           </tr>
    </thead>
    <tbody>
            <?php foreach ($success as $row): ?>
            <tr>
                <td><?php echo $row['trans_date'];?></td>
                <td><?php echo $row['settlement_refNo'];?></td>
                <td><?php echo $row['shmart_refID'];?></td>
                <td><?php echo $row['customer_name'];?></td>
                <td><?php echo $row['trans_amount'];?></td>
                <td><?php echo $row['tdr_amount'];?></td>
                <td><?php echo $row['serviceTax_amount'];?></td>
                <td><?php echo $row['final_settled_amount'];?></td>
                <td><?php echo $row['username'];?></td>
            </tr>
            <?php endforeach; ?>
    </tbody>
</table>
</body>
</html>

This is the controller

        $settlement_processed_data['success'] = $this->report_generation_model->get_processed_data();       
        $myFile = FCPATH."admin_process_settlement_files/".date('d-M-Y').".xls";        
        $stringTransData = $this->parser->parse('settlement_processed_xls', $settlement_processed_data, true);
        $fh = fopen($myFile, 'w') or die("can't open file");
        fwrite($fh, $stringTransData);
        fclose($fh);
        $data = file_get_contents("/var/www/html/testingserv/admin/admin_process_settlement_files/".date('d-M-Y').".xls");
        $name="settlements.xls";
        force_download($name, $data);
        unlink($myFile);

What the controller does is,Get the array from the database , and load it into the view and parse the contents,but the content which is been passed has

���������������� ���������������� ���������������� ���������������� ���������������� ���������������� ���������������� ���������������� ���������������� ����������� ���� ��������  ����

and the resulting xls file which is generated is having the in the middle of the excel file.Why is this happening?