It's worked for me. But, it's seems like receive any file as long it's excel file and insert into db. I have been trying to import file that didn't match with the column requirement at column table but it's still success insert that data. How to add validation so just file that have save column with the table at db inserted. So, i can return an error message. Thanks.
this did not work for me Im getting an error on the main.php file on line 9 and i didnt change anything. can you help me mr ? This Error : An uncaught Exception was encountered Type: Error Message: Call to undefined method Main_model::fetch_data() Filename: C:\xampp2\htdocs\testing\application\controllers\main.php Line Number: 9 Backtrace: File: C:\xampp2\htdocs\testing\index.php Line: 315 Function: require_once
I want to show data in a table but then i want to show at the bottom i a new row, the result of a SUM From a column, how can i do that with datatables, jquery AJAX PHP and mysqli?? Could you do a tutorial.?
There are minor changes you need to do,first you need to create a database called testing then navigate on database.php file to make sure the configuration matches your database connection,second you have to go route.php and add $route['excel_import/fetch']='excel_import/fetch'; then go to your browser type the link your base_url followed with excel_import/fetch e.g base_url/excel_import/fetch and it will work as a magic,note:base_url represent the url path to your project root directory...
GOOD FRIEND I WANT TO INSERT AN EXCEL FILE, BUT BEFORE I WOULD LIKE TO VALIDATE THAT IT DOES NOT HAVE EMPTY FIELDS AND AFTER THAT VALIDATE THAT IT IS NOT IN THE DATABASE NOTIFYING WITHOUT INSERT NOTHING
i think u should do that in the controller. first you need to check each data success or not inserted. push it into php object and then return it to view. you can display that data as you like. for example : in this tutorial. controller send one parameter as ajax function success return.
Rahmat Firman i already did it. Query insert_batch return number of successful inserted records, ex: resultNumber. I get this number to function get_last_record(resultNumber) which is order by id (auto incre) desc. Then i just compare returned data to excel file.
i had watch this tutorial, very helpfully, i succeeded to display the data from the db , but the insert part is not working, is someone can provide assistance ?
can you show the error message ?see console at your web browser to see if any error happen with your code. make sure you didn't miss any line of code. see the full code at the web under description and compare with your code. contact me : transilica@gmail.com
i think it was because you send $data in controller but not setting $data in model, so $data is not initialization for model, that's what make it error
Friend, thank you, it worked, greetings from Santa Marta Colombia. I did it directly from the form. in the view put
Gracias por la ayuda Saludos desde BOLIVIA
thanks a lot bro, really helpful
how to update only the existing row with same id in import?
can make how skipp if row value empty please
excuess me their as issue of duplicate key error can you tell me the solution for it
Your tutorial is good .I need react tutorial .This type tutorial will be help full to everybody........
It is working completely. thank you keep it up.
It's worked for me. But, it's seems like receive any file as long it's excel file and insert into db. I have been trying to import file that didn't match with the column requirement at column table but it's still success insert that data. How to add validation so just file that have save column with the table at db inserted. So, i can return an error message. Thanks.
you can get the count of rows in selected file and database. just check weather they are equal or not
I am getting this error
Message: Class 'PHPExcel_Shared_String' not found
i have a function fetch issue not importin data can you help me
this did not work for me Im getting an error on the main.php file on line 9 and i didnt change anything. can you help me mr ?
This Error :
An uncaught Exception was encountered
Type: Error
Message: Call to undefined method Main_model::fetch_data()
Filename: C:\xampp2\htdocs\testing\application\controllers\main.php
Line Number: 9
Backtrace:
File: C:\xampp2\htdocs\testing\index.php
Line: 315
Function: require_once
Yeah That's worked for me. Thank you so much dear. Hope you post more useful videos in future
it work on local is fine but it is not working in live server how can i fix this
I want to show data in a table but then i want to show at the bottom i a new row, the result of a SUM From a column, how can i do that with datatables, jquery AJAX PHP and mysqli?? Could you do a tutorial.?
Thank you 😍
This did not work for me. Im getting an error on the main.php file on line 9 and i didnt change anything
There are minor changes you need to do,first you need to create a database called testing then navigate on database.php file to make sure the configuration matches your database connection,second you have to go route.php and add $route['excel_import/fetch']='excel_import/fetch'; then go to your browser type the link your base_url followed with excel_import/fetch e.g base_url/excel_import/fetch and it will work as a magic,note:base_url represent the url path to your project root directory...
Hello Webslesson can you make a tutorial about editing and deleting imported data via mysql and then display it in excel after exporting?
sir please tell me about read and write docx file in codeigniter
I got an ziparchieve error. Is says something wrong with excel2007.php
Thankyou so so much. You're my hero!
GOOD FRIEND I WANT TO INSERT AN EXCEL FILE, BUT BEFORE I WOULD LIKE TO VALIDATE THAT IT DOES NOT HAVE EMPTY FIELDS AND AFTER THAT VALIDATE THAT IT IS NOT IN THE DATABASE NOTIFYING WITHOUT INSERT NOTHING
An uncaught Exception was encountered
Type: Error
Message: Call to undefined method Main_model::fetch_data()
Filename: C:\xampp\htdocs\andreanrahmansyahputra\how-to-import-excel-file-in-codeigniter\application\controllers\main.php
Line Number: 9
Backtrace:
File: C:\xampp\htdocs\andreanrahmansyahputra\how-to-import-excel-file-in-codeigniter\index.php
Line: 315
Function: require_once
value fetch successfully done but not in insert or importing data into database. hope anyone will help @Webslesson
How to know that which row is inserted successful or not?
i think u should do that in the controller. first you need to check each data success or not inserted. push it into php object and then return it to view. you can display that data as you like. for example : in this tutorial. controller send one parameter as ajax function success return.
Rahmat Firman i already did it. Query insert_batch return number of successful inserted records, ex: resultNumber. I get this number to function get_last_record(resultNumber) which is order by id (auto incre) desc. Then i just compare returned data to excel file.
Thank You , Best Video. If you can please prepare tcpdf with code igniter video
Ya sure we will publish video tutorial on Generate PDF by using TCPDF with Codeigniter.
Thanks 👍
Hi Sir its humble request please accet .
Can We code in This video also in Codeligniter 4
Does this still work with the new PHPspreasheet extion?
i had watch this tutorial, very helpfully, i succeeded to display the data from the db , but the insert part is not working, is someone can provide assistance ?
can you show the error message ?see console at your web browser to see if any error happen with your code. make sure you didn't miss any line of code. see the full code at the web under description and compare with your code.
contact me : transilica@gmail.com
Why this is not working?? And the css not applied. Can you help me?
db fetch successfully done but not in insert or importing data into database. hope anyone will help
awesome tutorial,
what if the date format?
Display no direct script access allowed
Good tutorial. Please can you send a download link to this tutorial so we can download it? Thank you
check in the description. He provide web link to see the full code.
@@rahmatfirman5765 500 internal server error. i download code above but not work
life saver👍🏽
Class 'ZipArchive' not found file => application/libraries/PHPExcel/Reader/Excel2007.php on line 85
The action you have requested is not allowed.
Really helpful.
Please make a tutorial about creating social app like facebook or whatsApp
how import dates? please
.sql file is not available in source code
It is not working out for me
Thanks
An uncaught Exception was encountered
Type: Error
Message: Call to undefined method Main_model::fetch_data()
Filename: C:\xampp\htdocs\prologin\how-to-import-excel-file-in-codeigniter\application\controllers\main.php
Line Number: 9
Backtrace:
File: C:\xampp\htdocs\prologin\how-to-import-excel-file-in-codeigniter\index.php
Line: 315
Function: require_once
plz give me Excel folder all files code like phpexcel.php, excel.php, IOFactory
Execllent
index name undefined :'v helpmeeeeeeeee
save permission
Hi Friends
500 internal server error
i think it was because you send $data in controller but not setting $data in model, so $data is not initialization for model, that's what make it error
@@rezachrisna2453 did you fix this one? can you show me full code. i download code above but not work. same 500 internal server error
i found it. you should set variable in autoload.php as video clip above. in 2:00
OBSOLETE!!!
thanks