如何合并像这样的图片列?
public function excel()
{
$this->load->helper('exportexcel');
$namaFile = "export_data.xls";
$button = "Export_My_Data";
$tablehead = 0;
$tablebody = 1;
$no = 1;
header("Pragma: public");
header("Expires: 0");
header("Cache-Control: must-revalidate, post-check=0,pre-check=0");
header("Content-Type: application/force-download");
header("Content-Type: application/octet-stream");
header("Content-Type: application/download");
header("Content-Disposition: attachment;filename=" . $namaFile . "");
header("Content-Transfer-Encoding: binary ");
xlsBOF();
$kolomhead = 0;
xlsWriteLabel($tablehead, $kolomhead++, "No");
xlsWriteLabel($tablehead, $kolomhead++, "Data A");
xlsWriteLabel($tablehead, $kolomhead++, "Date");
xlsWriteLabel($tablehead, $kolomhead++, "Date 1");
xlsWriteLabel($tablehead, $kolomhead++, "Date 2");
foreach ($this->data_model->get_all() as $data) {
$kolombody = 0;
xlsWriteNumber($tablebody, $kolombody++, $no);
xlsWriteNumber($tablebody, $kolombody++, $data->data_a);
xlsWriteNumber($tablebody, $kolombody++, $data->date_1);
xlsWriteNumber($tablebody, $kolombody++, $data->date_2);
$tablebody++;
$no++;
}
xlsEOF();
exit();
}
这可行,但是我想像上表一样显示它,如果有人可以帮助我,我感到非常高兴?