PHPackages                             chriskelemba/excel-import-laravel - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. chriskelemba/excel-import-laravel

ActiveLibrary

chriskelemba/excel-import-laravel
=================================

Dynamic CSV/XLSX import package for Laravel with generic table mapping and preview

v0.3.0(2mo ago)01↓100%MITPHPPHP ^8.2

Since Mar 5Pushed 2mo agoCompare

[ Source](https://github.com/chriskelemba/excel-import-laravel)[ Packagist](https://packagist.org/packages/chriskelemba/excel-import-laravel)[ RSS](/packages/chriskelemba-excel-import-laravel/feed)WikiDiscussions main Synced 1mo ago

READMEChangelogDependencies (4)Versions (4)Used By (0)

Dynamic Importer for Laravel
============================

[](#dynamic-importer-for-laravel)

Backend package for dynamic CSV/XLSX preview and import into any configured database table.

Install
-------

[](#install)

```
composer require chriskelemba/excel-import-laravel
```

Publish config
--------------

[](#publish-config)

```
php artisan vendor:publish --tag=dynamic-importer-config
```

Configure (Optional)
--------------------

[](#configure-optional)

`config/dynamic-importer.php`

```
'discovery' => [
    'allow_unconfigured_tables' => true,
    'allow_tables' => [], // optional allow-list
    'exclude_tables' => ['migrations'],
],

// Optional strict per-table overrides
'tables' => [
    'skills' => [
        'required' => ['name'],
        'unique_by' => ['name'],
        'mode' => 'upsert',
    ],
],
```

MongoDB Support
---------------

[](#mongodb-support)

Install in your Laravel app:

```
composer require mongodb/laravel-mongodb
```

Configure a `mongodb` connection in `config/database.php`, then pass `connection=mongodb` in importer requests.

Notes:

- SQL connections auto-discover table columns/types via schema introspection.
- MongoDB collections are schema-less; prefer defining `columns` in `dynamic-importer.tables`.
- If `columns` are not configured, importer will infer top-level keys from sample documents.

Endpoints
---------

[](#endpoints)

- `GET /imports/databases?connection=mongodb&table=loans`
- `GET /imports/template?table=skills&connection=mysql`
- `POST /imports/preview`
- `POST /imports/run`
- `POST /imports/run-multi`

### Preview payload

[](#preview-payload)

`multipart/form-data`:

- `file`: csv/txt/xlsx
- `table`: configured table name
- `connection` (optional): Laravel DB connection name (e.g. `mysql`, `mongodb`)
- `column_map`: map of `excel_header => db_column`
- `static_values` (optional): fixed values applied to every imported row (e.g. `ctg_id => 2`)
- `header_row` (optional, 1-based)
- `sheet_index` (optional, default `0`)
- `sample_rows` (optional)

### Run payload

[](#run-payload)

`multipart/form-data`:

- `file`
- `table`
- `connection` (optional)
- `column_map`
- `static_values` (optional object)
- `header_row` (optional)
- `sheet_index` (optional)
- `mode` (optional: `insert` or `upsert`)
- `unique_by` (optional array for upsert)

### Multi-table run payload

[](#multi-table-run-payload)

`multipart/form-data`:

- `file`
- `connection` (optional global connection)
- `imports[0][table]`
- `imports[0][column_map][Loan No]`
- `imports[0][column_map][Customer]`
- `imports[0][mode]`
- `imports[0][unique_by][0]`
- `imports[0][static_values][ctg_id]` (optional fixed value / foreign key)
- `imports[1][table]`
- `imports[1][column_map][...]`

### Database preview

[](#database-preview)

Use `GET /imports/databases` to drive UI selectors:

- `connection` (optional): selected database connection (`mysql`, `mongodb`, ...)
- `table` (optional): returns selected table/collection definition including columns

Notes
-----

[](#notes)

- CSV support works out of the box.
- XLSX support requires `phpoffice/phpspreadsheet`.
- XLSX preview grid includes style/merge metadata (`style`, `rowspan`, `colspan`, `skip`) when available from reader output.
- By default, any existing DB table can be imported (dynamic schema discovery).
- Use `discovery.allow_tables` / `discovery.exclude_tables` for restrictions.

###  Health Score

35

—

LowBetter than 80% of packages

Maintenance87

Actively maintained with recent releases

Popularity2

Limited adoption so far

Community6

Small or concentrated contributor base

Maturity38

Early-stage or recently created project

 Bus Factor1

Top contributor holds 100% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Every ~2 days

Total

3

Last Release

64d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/3f2e2a68c016c348e7c39c94f5f72f095414bf225f047130fc01f379d2d05de7?d=identicon)[chriskelemba](/maintainers/chriskelemba)

---

Top Contributors

[![chriskelemba](https://avatars.githubusercontent.com/u/151122714?v=4)](https://github.com/chriskelemba "chriskelemba (4 commits)")

### Embed Badge

![Health badge](/badges/chriskelemba-excel-import-laravel/health.svg)

```
[![Health](https://phpackages.com/badges/chriskelemba-excel-import-laravel/health.svg)](https://phpackages.com/packages/chriskelemba-excel-import-laravel)
```

###  Alternatives

[laravel/cashier

Laravel Cashier provides an expressive, fluent interface to Stripe's subscription billing services.

2.5k25.9M107](/packages/laravel-cashier)[laravel/cashier-paddle

Cashier Paddle provides an expressive, fluent interface to Paddle's subscription billing services.

264778.4k3](/packages/laravel-cashier-paddle)[api-platform/laravel

API Platform support for Laravel

59126.4k6](/packages/api-platform-laravel)[aedart/athenaeum

Athenaeum is a mono repository; a collection of various PHP packages

255.2k](/packages/aedart-athenaeum)[dragon-code/laravel-http-logger

Logging incoming HTTP requests

319.8k3](/packages/dragon-code-laravel-http-logger)[bjuppa/laravel-blog

Add blog functionality to your Laravel project

483.3k2](/packages/bjuppa-laravel-blog)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
