PHP excel import data into database
HTML-код
- Опубликовано: 28 сен 2024
- In this video, I will show you how to use PHPExcel library to data import into database.
Learn PHP Online with Me:- bit.ly/LearnPH...
To help and support me(Donate Me):- bit.ly/DonateP...
Download Source Code:- bit.ly/phpExce...
Download PHPExcel:- filehippo.com/...
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
✅Subscribe: / @programmingwithvishal
I am a Digital Marketer by passion and a Developer by profession. With experience and expertise spanning around 10 years, in the Digital space.
Good amount of experience in development of web applications using PHP, .Net, JavaScript Library’s, Frameworks, CMS, API’s, Reporting tools and Payment Gateways. Skilled in digital viral marketing, technology innovation's, brand building and all phases of the Web development lifecycle with an expert in translating business requirements into technical solutions and fanatical about quality, usability, security, and scalability. Dealing with and resolving problems and issues which arise.
Your video always become best and best . 👍
Ye like hum 1 bar hi kyu de sakate hai youtube par .... Main to 1000 likes dena chahata hu vishal sir ko.... Thank you so much sir...
Thanks a lot Akshay
Thanks alot. I am searching this...
Plz sir, if possible make a mlm project, or a online vdo class room
Thanks a lot.
Already planning for MLM, but will start after sometime.
Great sir
Thanks Ravi
This video very useful for me
Great Sagar
vishal sir is our dictionary
Hat's off sir thank you for this video
Sir, I am trying to use this but I am getting this error
Warning: Trying to access array offset on value of type int in C:\xampp\htdocs\uploads\PHPExcel\PHPExcel\Cell\DefaultValueBinder.php on line 89
PLs help me sir
Sir nice. But you can use "accept" attribute in input type file html element. Everything nice. Carry on sir.
Agree
But we have a option to change this to all
Thanks...it helped me a lot.
great video sir. sir agar hum same excel sheet m next day kch data add karke upload kare to phle se save data phir se add ho rahe hai. mai chahta hn purani excel sheet m hi record add karu ar jitne phle ho gye h uske aage se add ho phle wale dubaara na add ho
Insert se pahle check karo kishi unique column ke base pe ki agar data inserted hai toh n kre
@@ProgrammingwithVishal OK sir got it
Thanks sir this is nice video.
Sir muze samaj nahi araha hai ki
Mai laravel series complete Karu ya nhi, kyu ki Mai abhi Mai BCA 3 Mai Hu aur Maine apaki core PHP jobhi ecomerce ke project the ao Maine complated Kar diye hai
Aur muze laravel BHI Achi tarah se samaj ata hai Maine usmebhi crud complete Kiya hai
To kya mere liye laravel continue karane achhaa hai ya nahi
Jitna sikh sako utna acha hai.
What if excell have formulas? This is not going to work.
Nice sir
Thanks
Wonderful video
Great, can we edit Excel spreadsheet using some free library like PHPExcel... Thank you 👏👍
Thank and nops
thank you sir
Too good sir 👍 isse laravel ke sath bhi apply kariyega please
Ji. Jaldi hoga wo bhi
@@ProgrammingwithVishal thank you 😊👍
Sir PHPExcel\Shared\String.php me line no. 529 per error hai kase solve karenge please help.
Maine aap wale ko as it is run kiya hai aur phpexcel ko download kiya hai usme bhi same error hai
There may be two solutions
Replace {} to [ ] on that lines wherever error occurred or downgrade the php version.
ruclips.net/video/-1HuID_R6QY/видео.html watch this to solve error sam came in my after this it worked
Sir plz make video on olx clone.....plz plz plz sir
Noted
Sir which books do you use to learn php?
I don't like books. Learn basic from anywhere and try to build scripts from your own.
@@ProgrammingwithVishal thank you sir🙏.. You're a inspiration for me.. Aap jese RUclips video create kr rahe ho that is life saving🙏😇
Thank you sir... Sir PHP se sql date time use karke ek project pe video banai ye sir
Hello Pritesh,
Samjha nahi maine. Please email me details.
You can convert the excel date to mysql date like below I did.
//Your input date
$input_date = $sheet->getCellByColumnAndRow(1,$i)->getValue();
$excel_date = $input_date; //here is that excel value 41621 or 41631
//Convert excel date to mysql db date
$unix_date = ($excel_date - 25569) * 86400;
$excel_date = 25569 + ($unix_date / 86400);
$unix_date = ($excel_date - 25569) * 86400;
//echo gmdate("Y-m-d", $unix_date);
//Insert below var to sql
$added_date = gmdate("Y-m-d", $unix_date);
Sir please provide me solutions localhost par chal raha h server par upload kar raha hua to nhi chal raha h data insert nahi ho raha h database mein
Check PHP version
@@ProgrammingwithVishal php version kaun sa hona chahiye?
Sir Mera PHP version 7.3 h
Try in 7
@@ProgrammingwithVishal sir php version 7 kiya phir bhi nahi ho raha h data insert database mein
Hello Sir Good Morning
sir please help me multi mail send import excel and multi mail send please help me (php Script)
How to do this task in laravel
Like the same way we are doing here
Fatal error: Array and string offset access syntax with curly braces is no longer supported in C:\xampp\htdocs\account\import1\PHPExcel\PHPExcel\Shared\String.php on line 529
sir upload karne pe yeh error a rahi hai
Same
ruclips.net/video/-1HuID_R6QY/видео.html watch this to solve error sam came in my after this it worked
Good job bro, but I have a bug when I'm trying to read integer data, I have received this message : Trying to access array offset on value of type int in C:\xampp\htdocs\pnc2 - Copie\admin\PHPExcel\PHPExcel\Cell\DefaultValueBinder.php on line 86
Anyone can help me
thnkx a lot
Have you got it right now??
Same problem i am facing
Sir mere Excel me 2 excel sheet hai aur mujhe one by one krke dono hi import krni hai every sheet me 80000 rows hai to kaise kren
Very Nice...
Next Video: Web Scraping....plzz
Will do after Laravel
it's not working show error
Fatal error: Array and string offset access syntax with curly braces is no longer supported in C:\xampp\htdocs\import\PHPExcel\PHPExcel\Shared\String.php on line 529
Fatal error: Array and string offset access syntax with curly braces is no longer supported in C:\xampp\htdocs\task\phpExcelImport\import\PHPExcel\PHPExcel\Shared\String.php on line 529
thanks for the code sir .. i have one doubt am facing a error ["Trying to access array offset on value of type int in PHPExcel/PHPExcel/Cell/DefaultValueBinder.php on line 90"] ... am using integer number in excel thats why am getting this error could you please help me in this
Best video 👌
Thanks a lot
nice
Thanks
iss library me brackets ka error aa rha hai...
Now {} for array in php is depricated...
solution is use [ ]
for($i=2;$i
sir ye file jab mene domain hosting kari to vaha per run nhi ker rahi Hai
Godaddy se domain or hosting kari hai
Thank you so much guruji....👌👌
Most welcome Akshay
Wow Sir, You are amazing your teaching style is the best that it made this code very easier to understand, thanks a lot for sharing knowledge, May God always bless you :)
You are most welcome
sir i need help, in java for
data import into database by java servlet or jsp/jsf.
I have no idea what you are saying. This does not sound like English
How can we do this with laravel ... Anyone please answer
Hello sir! I have php8.1.2 version . I am installing PHPExcel1.8.1 for importing Excel file into databases but this library shows many error , I have resolved many error but there are more error also left. Sir please give me some suggestions how can I overcome this problem
I have also same prblem
main do se jada column import krta hu to ye error milta hai
Fatal error: Array and string offset access syntax with curly braces is no longer supported in C:\xampp\htdocs\login\PHPExcel\PHPExcel\Shared\String.php on line 529
This is because of php version. Update PHP version to 7.2 or update your phpexcel library
ruclips.net/video/-1HuID_R6QY/видео.html watch this to solve error sam came in my after this it worked
I was waiting for this, thanks Mr.Vishal..i have a doubt. Is there any restriction for number of rows?
Thanks Binu
I don't know about restrictions. But I used this for around 2L rows and it works perfectly fine
@@ProgrammingwithVishal sounds good,I will try this method.thank you very much.
could you pls advice, how can I contact you to clear my doubt in PHP?.
Email me at phpvishal@gmail.com
Laravel me kaise kare unicode language ke saath
Awesome 👍 sir
Thanks
Multiple sheets ho to ?
sir image ko kaise import karege
How to upload hindi language/multi language data in excel.
Thank you so much it was big problem can you do the export one as well please.
Welcome and yes export will be out in sometime
thanks man
Fatal error: Array and string offset access syntax with curly braces is no longer supported in C:\xampp\htdocs\php\excel\import\PHPExcel\PHPExcel\Shared\String.php on line 529
so help me
this error keeps coming in different file
There may be two solutions
Replace {} to [ ] on that lines wherever error occurred or downgrade the php version.
Sir app man ki bat samaj jate hoo
Mai comment karne hi wala tha excel export ka video ke wareme
& Tabhi apne bola ki next video ushi ke uppar ayega
Hahahah
Thanks Aniket
Thank you so much for such a wonderful video very informative perspicuous and crisp, two quick points a. Why did you delete first row (probably to fetch data values only and not headings), I suppose we should not touch the structure of the excel to make it more practical through programming we should fetch second row onward. b. Why would we empty the msql table every time we upload data, that will not serve the purpose. You see, what I am trying to say is in real world it will be very useful if we design a web page which allows users to upload excel file (which has a fixed structure) as input data instead of filling a web form. Now the system should be smart enough to check if the uploaded data already there (duplicate upload) based on certain field(s). and (if not duplicate then) it should append the data in the excel file as the last row of mysql data. Ideally in this setup all the data that excel file will be considered as ONE ROW. Sorry this is too long but it will it a general utility. Thanks
Great....
(Reminder : Hospital Management system 😁...)
Will do after Laravel
@@ProgrammingwithVishal 🥳🥳🥳🥳🥳🥳🥳🥳🥳🥳🥳🥳🥳🥳🥳🥳🥳🥳🥳🥳🥳🥳🥳🥳🥳🥳
Sir ji to much ho aap. Itna gyan late kaha se ho aap. Baki RUclips fail hai apke samne.
Thanks Ashish
Ye bahut usefule tha.leking agar mujhe row ko validate krna ho to kaise krenge
jaise normal PHP maine karte hain waise hee
vishal bahee WordPress ka crud application ka ager video bana dain to humaray liyer helpfull rahai ga
Actually mujhe personally WordPress pasand nahi isliye maine bahut kam video banata hoon WordPress pe
@@ProgrammingwithVishalno issue vishal bahee you are real developer
Hello,
I want my excel column names to be remained in my excel file. Suppose I want Name attribute of my excel not to be removed. How can I do it? Is there any change in "getCellByColumnAndRow" ?
I'm very must impress with your lecture, can you please make video to retrieve import Google sheets data to MySQL once we submit through form automatically
Array and string offset access syntax with curly braces is no longer supported in PHPExcel\Shared\String.php
No matter which topic I think of, there always exists a video by Vishal Sir. Thanks a lot!!
how to update from csv file sir ?
You can convert the excel date to mysql date like below I did.
//Your input date
$input_date = $sheet->getCellByColumnAndRow(1,$i)->getValue();
$excel_date = $input_date; //here is that excel value 41621 or 41631
//Convert excel date to mysql db date
$unix_date = ($excel_date - 25569) * 86400;
$excel_date = 25569 + ($unix_date / 86400);
$unix_date = ($excel_date - 25569) * 86400;
//echo gmdate("Y-m-d", $unix_date);
//Insert below var to sql
$added_date = gmdate("Y-m-d", $unix_date);
Sir. Mera first row insert ho raha he.
Baki nahi ho raha. 😭
Query ko print karo answer mil jayega
Sir I'm not unable to import data from Excel when I'm including library it is showing page is not working
If duplicate email also exist on excel sheet then ignore this record to insert into my table. Please help?
vishal bahee acha topic tha so nice of you
Thanks a lot
Dear vishal,
I am from Bangladesh and i am a big fan of your php programming.
I have a request to you if you have enough time please make a video onthis topic.
Topic: Recently i am learning web development. I downloaded some open source softwares source code for practice. But when i want to edit html directory, it shows access denied for this directory. My point is how i can hide my codea also like this so that i can stay safe if i make something important?
I know you are busy, bug if you give me just a clue on how to start learning on this issue i will be greatly appreciated to you.
Thank you
Thanks thanks sir
Welcome Sagar
Sir your codes always work thanks for your support
liked it...
Thanks
Sir ek issue h same code ko mein server par kar raha hua to nhi chal raha h means data insert nhi ho raha h database mein.so sir please provide me exact solution immediately sir .
Awesome sir
Thanks
@@ProgrammingwithVishal sir ek video bna digiye super admin ka use to student and teacher
But if we wanted to send blank entry as data then how to remove extra blank..
import me 500 se jyada row import nahi ho raha sir. help.. anyone??
Check your data, something wrong in your data. It's not related with this script
@@ProgrammingwithVishal fixed it. The max_execution_time was set to 30 seconds, and since my data was almost 6000 rows it was taking longer. hence the issue.
input as date in the same excel what should we do ?
There's a trick to do it
You can convert the excel date to mysql date like below I did.
//Your input date
$input_date = $sheet->getCellByColumnAndRow(1,$i)->getValue();
$excel_date = $input_date; //here is that excel value 41621 or 41631
//Convert excel date to mysql db date
$unix_date = ($excel_date - 25569) * 86400;
$excel_date = 25569 + ($unix_date / 86400);
$unix_date = ($excel_date - 25569) * 86400;
//echo gmdate("Y-m-d", $unix_date);
//Insert below var to sql
$added_date = gmdate("Y-m-d", $unix_date);
Sir i am getting 500 error using your code
Hi sir,
Is possible in php .xlsx to .dat file conversation
sir really thnks
all code is working
Fatal error: Array and string offset access syntax with curly braces is no longer supported in D:\xampp\htdocs\import\PHPExcel\PHPExcel\Shared\String.php on line 529
there's a error.. pls help me sir
Did resolve it?
PhpExcel is dead.Outdated knowledge se kisi ka fayda nhi hota.Sirf views ke liya Hume pagal bana rahe ho.Waise agar pta na ho to bta du an PhpSpreadsheet use hoti h
Bhai pahle thoda samjho dead ka kya means hota hai. PHPExcel dead means wo support nahi de rahe. Use toh kar sakte hain na.
Seriously.
Jis library koi support nhi kar raha h usko sikhkar time waste nhi hoga to aur kya hoga.
Khud Github keh raha h ki PhpExcel dead h ,iski jagah phpSpreadsheet ko use karo
@@areena444 Are bhai ji ye toh apke upper hai, ek maintenance naam ki bhi chej hoti hai, may be we both have different prospective
@@sumitdutta2763 OK bro,you won this fight.
Congratulations for your bright future.
Sir, how to integrate payment gateway in website using node.js express js or reactjs. How . Step by step. And execute customers payment details. Plz upload video. There is no video at RUclips. I searched complete
Noted. Just give me sometime.
Hello sir , i think it will upload duplicate data too.
Sir, is it possible to upload photos this way from excel file.
sir kindly ye video upload kry k php ky zariye hum online server say data ko local printer pay kase print kr suckte ha
Ji bilkul uske liye apko printer ki team se cordinate karna hoga. Sab printer ka format alag alag hota hai.
Thanks ♥
Great👍👍👏
Sir aap mera video nhi banaye, jisme mene kaha tha ki kisi viral fake recharge website me WhatsApp par message share karane ka button hota hai, please next video yahi bana dijiye
Ye week main aa jayega apka video
@@ProgrammingwithVishal
Theek hai sir,
Aap is fake website ko dekh skte hai
rb.gy/mobx4e
Is website ke last process me aapko waisa button mil jayega
Sir yeh video dekh ke practice kya.. accha technique tha. Par sir ek hi database me multiple table ho toh kaise data import karenge....
Use a sql query unique
Ótimo vídeo parabéns 👏.
Thanks
Dear vishal sir, please its a humble request that can you please make a video on file pdf read update and delete also plz reply so that i know you see this message its urgent
PDF read and update means?
@@ProgrammingwithVishal i mean sir what if a user want to upload a pdf on different directory or folders and want to replace that later
Sir ifsc Or Pin code wali series please video lekar aayiye Tool website ke liye..
IFSC code pe already video banaya hua hai maine.
ruclips.net/user/ProgrammingwithVishalsearch?query=IFSC
Sir php k through database ( if possible we can select table whom we want to export) backup ki video bana dijiye
Noted
@@ProgrammingwithVishal thanks sir I am eagerly waiting for this.
api k use ka tutorial b bna lain....please
Ji, Omer jaldi aayega
Thank you sir. Sir laravel ka series complete hone ke baad react js ke upar bhi series layega. Q ki aapki series samajh me aati hain...
Ji. I am already planning
sir apne for loop mein no. of rows
Sirf < use karne se last record nahi milega apko
Sir file upload in Google drive kab video aayega
Will do shortly. Will try this week only.
Thanks sir
Sir
Sir plz