$objPHPExcel->getActiveSheet()->SetCellValue('E1', 'Contact_No') $objPHPExcel->getActiveSheet()->SetCellValue('D1', 'DOB') $objPHPExcel->getActiveSheet()->SetCellValue('C1', 'Email') $objPHPExcel->getActiveSheet()->SetCellValue('A1', 'First Name') After open the file in text editor, We need to setup database credential in this file like below. we need to go application/config/ and open database.php file in text editor. In this step, We need to connect our project to database. INSERT INTO import (id, first_name, last_name, email, dob, contact_no) VALUES ) ENGINE=InnoDB DEFAULT CHARSET=latin1 COMMENT='datatable demo table' AUTO_INCREMENT=1 Last_name varchar(100) NOT NULL COMMENT 'Last Name',Įmail varchar(255) NOT NULL COMMENT 'Email Address',ĭob varchar(20) NOT NULL COMMENT 'Date of Birth',Ĭontact_no varchar(50) NOT NULL COMMENT 'Contact No', Id int(11) NOT NULL AUTO_INCREMENT COMMENT 'Primary Key',įirst_name varchar(100) NOT NULL COMMENT 'First Name', After successfully create a database, you can use the below sql query for creating a table in your database. In this step, we need to create database name demo, so let’s open your phpmyadmin and create the database with the name demo. Require_once APPPATH."/third_party/PHPExcel.php" If (!defined('BASEPATH')) exit('No direct script access allowed') Now we need to create Excel.php file into application/library, So go to application/library and create one file name Excel.php and put the below code here. After extract this library move to PHPExcel folder like application/third_party/PHPExcel and also move PHPExcel.php file to application/third_party/PHPExcel.php. Next, we need to download phpExcel library from this link, and extract into application/third_party folder. Set Base URL like this $config = ' Download phpExcel Libraryĭownload this excel library here : click here Next we will set the some basic configuration on config.php file, so let’s go to application/config/config.php and open this file on text editor. And change the download folder name “demo” Basic Configurations In this step we will download the latest version of Codeigniter, Go to this link Download Codeigniter download the fresh setup of codeigniter and unzip the setup in your local system xampp/htdocs/.
0 Comments
Leave a Reply. |
Details
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |