This is a simple plugin to create excel output.
[code]<?php if (!defined('BASEPATH')) exit('No direct script access allowed');
/*
function to_excel($array, $filename='out') { header('Content-type: application/vnd.ms-excel'); header('Content-Disposition: attachment; filename='.$filename.'.xls');
echo '<table><tr>'; foreach($array[0] as $key=>$val) echo '<th>'.$key.'</th>'; echo '</tr>'; foreach($array as $key=>$val) _writeRow($val); echo '</table>';
}
function _writeRow($row, $isHeader=false) { echo '
Example usage
[code]to_excel($this->model->getUsersAsArray());[/code]
There was an error while loading. Please reload this page.