Be part of JetBrains PHPverse 2026 on June 9 – a free online event bringing PHP devs worldwide together.

phayes0289's avatar

Looking for a package for importing XL and CVS spreadsheets

I am building a fairly large app that requires quite a bit of data to set up initially. I am looking for a package that will allow a user to easily import data and can be used easily on multiple tables within the app.

Are there any recommendations? I see there are quite a few packages out there, so I would appreciate some feedback as to which ones are good and which ones are not so good.

Thanks.

0 likes
2 replies
LaryAI's avatar
Level 58

There are several packages available for importing Excel and CSV spreadsheets in Laravel. Here are a few popular ones:

  1. Laravel Excel: This package provides a simple and elegant way to import and export Excel and CSV files. It supports various file formats and provides a fluent interface for importing data. You can find more information and usage examples in the Laravel Excel documentation. To install the package, you can use Composer:
composer require maatwebsite/excel
  1. PhpSpreadsheet: This is a powerful PHP library that allows you to read, write, and manipulate Excel and CSV files. It provides a wide range of features and supports various file formats. You can find more information and usage examples in the PhpSpreadsheet documentation. To install the package, you can use Composer:
composer require phpoffice/phpspreadsheet
  1. Spout: This is a lightweight PHP library for reading and writing spreadsheet files. It supports Excel and CSV formats and provides a simple and efficient API. You can find more information and usage examples in the Spout documentation. To install the package, you can use Composer:
composer require box/spout

These packages should provide you with the necessary tools to import Excel and CSV spreadsheets into your Laravel application. Make sure to read the documentation and examples provided by each package to understand how to use them effectively.

Snapey's avatar

Regarding Lary's wisdom;

maatwebsite/excel is a laravel wrapper for phpspreadsheet. It is now called Laravel-Excel, but still uses the maatwebsite/excel repository. https://laravel-excel.com/

phpoffice/phpspreadsheet is not laravel specific. There is no good reason to use this over maatwebsite/excel

box/spout - this package is abandoned

You should also take a look at https://github.com/spatie/simple-excel

Please or to participate in this conversation.