[eluser]Tamilmani[/eluser]
I just include the function in controller
function dump(){
$this->load->plugin(‘to_excel’);
$this->db->use_table(‘users’);
$this->db->select(‘user_name’, ‘first_name’);
// run joins, order by, where, or anything else here
$query = $this->db->get();
to_excel($query);
}
users is a table
user_name, first_name are fields
thatsall
the result will be send into to_excel($query)
I given only original query .....