samheldev/excel-mapper

Laravel package to map Excel columns to database fields

Installs: 1

Dependents: 0

Suggesters: 0

Security: 0

Stars: 0

Watchers: 0

Forks: 0

Open Issues: 0

pkg:composer/samheldev/excel-mapper

v1.0.0 2025-05-28 13:35 UTC

This package is auto-updated.

Last update: 2025-12-28 15:22:34 UTC


README

Excel Mapper is a Laravel package that provides a simple UI and backend logic to import Excel files into your database with customizable column mapping. It is built with Laravel Livewire and supports dynamic table selection, column mapping, and validation.

🚀 Features

  • Upload Excel/CSV files via Livewire.
  • Map Excel columns to database table columns.
  • Automatically normalize column names.
  • Display mapped data before importing.
  • Supports row-level validation.
  • Rules can be defined per table using the config/excel-import.php file.

📦 Installation

composer require sam/excel-mapper
php artisan vendor:publish --provider="Sam\ExcelMapper\ExcelMapperServiceProvider" 
php artisan vendor:publish --tag=excel-import-config # Publish the config file

📄 Configuration

php artisan vendor:publish --tag=excel-import-config # Publish the config file

🧪Validation

You can define validation rules for each table in the config/excel-import.php file. The rules will be applied to the data before importing it into the database.