Тёмный

How to Import Excel Data in Laravel and Insert into Database 

Webslesson
Подписаться 97 тыс.
Просмотров 69 тыс.
50% 1

Learn How to importing data from Excel Speedsheet by using Maatwebsite package in Laravel and insert into Mysql database. How to import excel file data in Laravel using Maatwebsite package. How to import Excel file into Mysql database in Laravel framework.
For Source Code - www.webslesson...

Опубликовано:

 

21 окт 2024

Поделиться:

Ссылка:

Скачать:

Готовим ссылку...

Добавить в:

Мой плейлист
Посмотреть позже
Комментарии : 57   
@hamadelmalik8424
@hamadelmalik8424 Год назад
Hi v good video but I need to compare vetween excel file and my database file I mean am not need to insert it in my database
@nshaikh1111
@nshaikh1111 2 года назад
Can we also import excel containing Image path , if yes can you please guide me for the same. ?
@MukeshKumar-mw2pp
@MukeshKumar-mw2pp 4 года назад
I am using version "laravel/framework": "^6.2", Excel package is not working getting this error {message: "Call to undefined method Maatwebsite\Excel\Excel::load()",…} please help
@nmggaming4525
@nmggaming4525 4 года назад
Error Call to undefined method Maatwebsite\Excel\Excel::create().. Any solution for this?
@becob250_tanvinimbalkar4
@becob250_tanvinimbalkar4 2 года назад
how do we sort the data from this whole excel data?
@alisheradm6527
@alisheradm6527 5 лет назад
I have a problem: Call to undefined method Maatwebsite\Excel\Excel::load()
@victorpinedo5121
@victorpinedo5121 5 лет назад
Hi, Maatwebsite/Excel package is not more include import options, that library has been change, you can solve this issue changing the package version in your composer.json file, put this: "maatwebsite/excel": "~2.1.0" in the require section on composer.json, then go to console terminal and type this: composer update !!! sorry my english please, am from Colombia, i don´t know much English!
@aravindharisree1902
@aravindharisree1902 5 лет назад
@Karthick V use "maatwebsite/excel": "2.1.30",
@anggitkurniawan5312
@anggitkurniawan5312 5 лет назад
sir can u help me? i get errors message "Call to undefined method Illuminate\Database\Query\Builder::table()", how to fix that??
@funtech2288
@funtech2288 5 лет назад
Illegal string offset 'customer_name' Sir i m facing this problem please tell me
@nikunjonil9530
@nikunjonil9530 5 лет назад
same here need fix
@Aisha-sy3bd
@Aisha-sy3bd 5 лет назад
how can you solve it ???
@leandrosalles4799
@leandrosalles4799 5 лет назад
You don't need both foreach just one, use this code or comment your second foreach. I apologize for my english, I'm brazilian foreach($data->toArray() as $key => $value) { // foreach($value as $row) { $insert_data[] = array( 'CustomerName' => $row['customer_name'], 'Gender' => $row['gender'], 'Address' => $row['address'], 'City' => $row['city'], 'PostalCode' => $row['postal_code'], 'Country' => $row['country'] ); // } }
@milkyplay6995
@milkyplay6995 4 года назад
How about automate all in one click, dynamic data in just one click
@jaikangammalangmei8271
@jaikangammalangmei8271 5 лет назад
Call to undefined method Maatwebsite\Excel\Excel::load() error
@karlgarcia3039
@karlgarcia3039 5 лет назад
Follow this Guide bishrulhaq.com/posts/import-export-excel-to-database-in-laravel Note: load is removed in maatwebsite 3.0, So make sure you copy paste 2.1.3 from site then run composer update. cheers!
@kingrichardguevara4969
@kingrichardguevara4969 4 года назад
@@karlgarcia3039 Hello, I have 2.1 maatwebsite/excel and 5.8 laravel but I still get this error
@karlgarcia3039
@karlgarcia3039 4 года назад
@@kingrichardguevara4969 follow the post. copy paste the maatwebsite in composer.json under require and run composer update in you cmd. Foklow the blog step 3 carefully. It should work
@tsedenbaljirerdenetsogt3079
@tsedenbaljirerdenetsogt3079 4 года назад
pls help me push git :( i cant (In ProviderRepository.php line 208: Class 'Maatwebsite\Excel\ExcelServiceProvider' not found )
@mohammed_m._ayoub
@mohammed_m._ayoub 5 лет назад
what is the import_exel/import in form
@chanpisethchea5121
@chanpisethchea5121 3 года назад
Hello Sir, I got error " Call to undefined method Maatwebsite\Excel\Excel::load()". Could you please advice?
@vasagan100
@vasagan100 3 года назад
i have same issue!!! Have you fixed that??
@FoudNa
@FoudNa 3 года назад
same. and not sound from plugin owner
@alaaalssadh2362
@alaaalssadh2362 3 года назад
@@vasagan100 version of excel package, use version 2 instead of version 3
@luckyadiatma2157
@luckyadiatma2157 4 года назад
Many thanks for this explanation, and it's work for me. But I have a question. Can we do Update instead Create? I trying to figure this out because there are 'id' in my database but the key value (like price, qty, etc) is not yet set. My goal is how to make excel file that we send to server is update the database instead insert in. Anyone with the same question?
@luckyadiatma2157
@luckyadiatma2157 4 года назад
Well, for those who have the same issue, I found the answer already. Here --> stackoverflow.com/questions/54304707/how-to-update-data-in-database-using-import-excel
@Aisha-sy3bd
@Aisha-sy3bd 5 лет назад
i faced this error " Illegal string offset 'customer_name' how can i solve this error please ???
@leandrosalles4799
@leandrosalles4799 5 лет назад
You don't need both foreach just one, use this code or comment your second foreach. I apologize for my english, I'm brazilian foreach($data->toArray() as $key => $value) { // foreach($value as $row) { $insert_data[] = array( 'CustomerName' => $row['customer_name'], 'Gender' => $row['gender'], 'Address' => $row['address'], 'City' => $row['city'], 'PostalCode' => $row['postal_code'], 'Country' => $row['country'] ); // } }
@alvaroparra8055
@alvaroparra8055 5 лет назад
​@@leandrosalles4799 This procedure is correct: ImportExcelController.php: foreach($data->toArray() as $key => $value) { $insert_data[] = array( 'CustomerName' => $value['customer_name'], 'Gender' => $value['gender'], 'Address' => $value['address'], 'City' => $value['city'], 'PostalCode' => $value['postal_code'], 'Country' => $value['country'] ); }
@felipecastillo4048
@felipecastillo4048 5 лет назад
thanks, I had a lot of problems with the version 3.1, I suggest to use this instead
@xavierdecker1825
@xavierdecker1825 4 года назад
what version it is?
@gedeonbassah2830
@gedeonbassah2830 3 года назад
Error Call to undefined method Maatwebsite\Excel\Excel::load() please help me
@alaaalssadh2362
@alaaalssadh2362 3 года назад
it is because the version of the excel package, don't use version 3, use version 2
@ИванЧеловеков-ъ9м
How to import in related tables (one to many for example)?
@kennyendowed9814
@kennyendowed9814 3 года назад
am having an error time out after 60 seconds my excel data have 10,000 records
@akfirebaseakfirebase5883
@akfirebaseakfirebase5883 5 лет назад
this msg :simplexml_load_string(): Entity: line 1: parser error : Start tag expected, '<' not found ?
@fardeenkhan4662
@fardeenkhan4662 5 лет назад
Can I implement this without using laravel framework?
@victorpinedo5121
@victorpinedo5121 5 лет назад
WHATEVER THIS CAN HELP: Maatwebsite/Excel package is not more include import options, that library has been change, you can solve this issue changing the package version in your composer.json file, put this: "maatwebsite/excel": "~2.1.0" in the require section on composer.json, then go to console terminal and type this: composer update !!! sorry my english please, am from Colombia, i don´t know much English!
@SoloSprints
@SoloSprints 5 лет назад
its throw error undefine customer_name
@brijeshmkt
@brijeshmkt 5 лет назад
laravel 5.8 in not work
@geraldterencio8635
@geraldterencio8635 4 года назад
Can anyone help me how to put validations in each column?
@vietvietnguyen8186
@vietvietnguyen8186 4 года назад
how to import date data ?
@vuthpich7552
@vuthpich7552 4 года назад
thanks you bro.
@25-henglyhort57
@25-henglyhort57 4 года назад
I got error Undefined index: customer_name
@raulduarte1057
@raulduarte1057 5 лет назад
Illegal string offset 'customer_name'
@rainmarkpolymers8217
@rainmarkpolymers8217 2 года назад
missing customer_name from table just fix in db to solve
@leandrosalles4799
@leandrosalles4799 5 лет назад
You don't need both foreach just one, use this code or comment your second foreach. I apologize for my english, I'm brazilian foreach($data->toArray() as $key => $value) { // foreach($value as $row) { $insert_data[] = array( 'CustomerName' => $row['customer_name'], 'Gender' => $row['gender'], 'Address' => $row['address'], 'City' => $row['city'], 'PostalCode' => $row['postal_code'], 'Country' => $row['country'] ); // } }
@khenieryanti9227
@khenieryanti9227 5 лет назад
Why I still get erorrs after use your code? It say, 'undefined variabel:row'. I apologize for my english,
@laeh475
@laeh475 4 года назад
it no work
@TheUndulyNoted
@TheUndulyNoted 3 года назад
Really? You couldn't get a mic?
@SoloSprints
@SoloSprints 5 лет назад
undefine customer_name
@lynic-0091
@lynic-0091 4 года назад
uwuwuevue luwuvel
Далее
Laravel 5.8 Crud Tutorial with Upload File - 1
8:24
Просмотров 53 тыс.
Load More Data in Laravel using Ajax
20:42
Просмотров 17 тыс.
Laravel Excel Live-Coding: Export - Edit - Import Back
15:32
PHP is the future
34:27
Просмотров 179 тыс.
PHP on the frontend! No more Javascript!
14:47
Просмотров 124 тыс.
Read any Excel File using PHPExcel in PHP
11:44
Просмотров 41 тыс.
Redis за 20 минут
23:22
Просмотров 149 тыс.
Laravel Excel - Useful Laravel Packages
24:44
Просмотров 67 тыс.