/Codeigniter-Excel-Export

An Codeigniter library for exporting the data from database to Excel file. (支持中文)

Primary LanguagePHP

Codeigniter-Excel-Export

An Codeigniter library for exporting the data from database to Excel file.

一个用于导出数据库数据到Excel文件的PHP库,用于Codeigniter框架中。(支持Excel中包含中文文字)

使用方法:

  1. 复制Excel.php到相应目录(application/libraries目录下)

  1. 创建数据结果集

load->library('excel'); $sql = $this->db->get('dbtable'); $this->excel->filename = 'abc123'; $this->excel->make_from_db($sql); } ?>
  1. 导出到Excel文

excel->make_from_array($titles, $array); } ?>

参考项目

https://github.com/EllisLab/CodeIgniter/wiki/Excel-Plugin

https://github.com/JOakley77/CI-Excel-Generation-Library