I’ve a laravel 10 project. And I’m using Laravel Excel Package.
I read the documentation, it’s divided into Imports
and Exports
. There isn’t any mention for just reading the file. I mean, I know we can make adjustments in Imports
, but I wanted to know any proper standard way just for reading the file & manipulating data.
Is there a way we can just create a class file for multiple Spreedsheets like it’s being done for Imports
and Exports
, just for reading and manipulating data, rather than importing it to database?
2
Answers
Answer:
Here is a solution to read and manipulate data from spreadsheet files directly in Laravel using the Laravel Excel package. This is particularly useful when you need to work with data from Excel files without importing them into a database.
Step 1: Install Laravel Excel
This approach allows you to work directly with data from Excel files in Laravel, and it can be useful for tasks that don’t involve importing data into a database.
I hope this helps anyone looking to work with Excel data in Laravel.
An alternative way is to use another library – https://packagist.org/packages/avadim/fast-excel-reader
This library is read-only data
If your file is too large, you can read it row by row