Skip to content

7elven/Codigniter-PHPExcel-Libraries

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

10 Commits
 
 
 
 
 
 

Repository files navigation

Codigniter-PHPExcel-Libraries

Easy to use return data to array

How to use

  1. load libraries in autoload
$autoload['libraries'] = array('database', 'session', 'xlsx');

or in your function

$this->load->library('xlsx');
  1. 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')

  1. get value
print_r($header);  // you will get array of header value 
print_r($values);  // you will get array of value in sheet
  1. 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); 

Releases

No releases published

Packages

No packages published

Languages