Upload Excel in MySQL using Phpspreadsheet in CodeIgniter

preview_player
Показать описание
In this video , you will be able to upload excel using phpspreadsheet in CodeIgniter.

Steps:
Create a form and input type file
In your controller, get file and check for extension
pathinfo - get the file extension (PATHINFO_EXTENSION)

For csv - $reader= new \PhpOffice\PhpSpreadsheet\Reader\Csv();
For xls - $reader= new \PhpOffice\PhpSpreadsheet\Reader\Xls();
For xlsx - $reader= new \PhpOffice\PhpSpreadsheet\Reader\Xlsx();

For loading the file use reader load function
getActiveSheet - for getting the active worksheet of excel
toArray - fetch the sheet data into array

create an array for inserting into database

insert_batch - for inserting batch data into database

Install php spreadsheet in codeigniter, if you have not watched it please check it out:

Create excel

Documentation:

Starting hello world:

Code Link:

Upload Excel in MySQL using Phpspreadsheet in CodeIgniter

#codeigniter #knowledgethrusters
Рекомендации по теме
Комментарии
Автор

You help me so much, I really love this. I suffered from several libraries but you just saved me. Thanks again

narheben
Автор

thank you for the video, in fact i want to apply some security check in my columns, how can i proceed ?

aymenlejmi
Автор

Very very very very useful video thank you for so much 💗

mert
Автор

where is the "PhpSpreadsheet"? i don't found "PhpSpreadsheet" into your source code. can you please let me know where i have to upload "PhpSpreadsheet"? thanks.

NoniGopalChandro
Автор

Thank you so much for tutorial finally my bug solved

vivekjalankar
Автор

Very very useful video thank you for so much for sharing an amazing video

ibrahimkhan
Автор

Thank you so much for your tutorial, it really helps me!

Afloverst
Автор

Can you please tell me how to upload xlsx file as json in mysql with the help of phpspreadsheet in core php. I am not familiar with codeignitor🙏🙏🙏🙏

ashishnath
Автор

I tried the step metioned in your tutorial and works fine on localhost but when uploaded on webserver it doesn't work. why? anyidea?

PratikBhuva
Автор

Hello mam i am using phpexcel library not phpspreadsheet bu i am faceing issue in reading my file can you please help me

BSVCREATION
Автор

getting error,

Severity: Notice



Message: Trying to access array offset on value of type int

Filename: Cell/DefaultValueBinder.php

Line Number: 56

proxygulshan
Автор

Please cashfree payment gateway intigration in laravel i m useing api but token issue please make a vedio..

pradeepkushwaha
Автор

how to import excel file with images into database ??

anandgupta
Автор

my problem is :The requested URL was not found on this server. when i click submit after choose file. please help me

reynaldiarytumanan
Автор

girl will be girl. she's excel sheet has such stuff that always shuffling in their mind. LOL😃😃

खुफियापुलिस-ढह
Автор

How to
1.protect worksheets and restrict user actions like row and column insertion, deletion, and resizing using php spreadsheet

2.Protect cells using a lock cell feature to restrict user editing action in selected cells using php spreadsheet

3.hide formula and set invisible using php spreadsheet

abdallahhussein
visit shbcf.ru