Read Excel

private function excel_handler($file){
	//Start to read
	require(APPPATH.'libraries/PHPExcel.php');
	include APPPATH.'libraries/PHPExcel/IOFactory.php';

	$fields = $this->config->item('order_upload_fields');
	//log_g($fields);

	//  Read your Excel workbook
	try {
		$inputFileType = PHPExcel_IOFactory::identify($file);
		$objReader = PHPExcel_IOFactory::createReader($inputFileType);
		$objPHPExcel = $objReader->load($file);
		//log_g($objPHPExcel);
	} catch(Exception $e) {
		die('Error loading file "'.pathinfo($file,PATHINFO_BASENAME).'": '.$e->getMessage());
	}

	//  Get worksheet dimensions
	$sheet = $objPHPExcel->getSheet(0); 
	$highestRow = $sheet->getHighestRow(); 
	$highestColumn = $sheet->getHighestColumn();

	$fields = $this->config->item('order_fields');
	$upload_fields = $this->config->item('order_upload_fields');
	//log_g($fields);

	for ($row = 2; $row <= $highestRow; $row++){ 
		//  Read a row of data into an array
		// The fourth param will convert datetime value automatically
		$rowData = $sheet->rangeToArray('A' . $row . ':' . $highestColumn . $row,
										NULL,
										TRUE,
										true);
		//  Insert row data array into your database of choice here
		$data = $this->fill_fields($fields, $upload_fields, $rowData[0]);
		log_g($data);
	}
	log_g($highestColumn);
}

Reference: