Easy to use return data to array
- load libraries in autoload
$autoload['libraries'] = array('database', 'session', 'xlsx');
or in your function
$this->load->library('xlsx');
- send parameter
list($header,$values) = $this->xlsx->convert('$filename', $first_row_of_header, $date_column);
-
$filename is .xlsx file ex. user.xlsx
-
$first_row_of_header is first row of header default is 1
-
$date_column is optional it's array of column have date data ex. array('E') or array('E','S')
- get value
print_r($header); // you will get array of header value
print_r($values); // you will get array of value in sheet
- final you will get code something like this
$this->load->library('xlsx');
list($header, $values) = $this->xlsx->convert('test.xlsx', 2, array('E','S'));
print_r($header);
print_r($values);