PHPackages                             frantzley/excel-to-mysql-web - 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. [Database &amp; ORM](/categories/database)
4. /
5. frantzley/excel-to-mysql-web

ActiveLibrary[Database &amp; ORM](/categories/database)

frantzley/excel-to-mysql-web
============================

Professional PHP package to import Excel files into MySQL with validation and upsert

v1.1.0(9mo ago)10[1 PRs](https://github.com/frantzleyadolphe/excel-to-mysql-php/pulls)MITPHPPHP &gt;=8.0CI passing

Since Sep 13Pushed 2mo agoCompare

[ Source](https://github.com/frantzleyadolphe/excel-to-mysql-php)[ Packagist](https://packagist.org/packages/frantzley/excel-to-mysql-web)[ RSS](/packages/frantzley-excel-to-mysql-web/feed)WikiDiscussions main Synced today

READMEChangelogDependencies (1)Versions (3)Used By (0)

Excel to MySQL Web Importer
---------------------------

[](#excel-to-mysql-web-importer)

```
A PHP package that allows you to import data from Excel files (.xls / .xlsx)
into a MySQL database with a full set of powerful features.
It is designed for developers and users who need fast data processing,
offering a simple UI with advanced functionalities such as live logs,
a progress bar, and log filtering.

```

🛠 Features
----------

[](#-features)

```
- Automatically creates the database if it does not exist.
- Automatically creates tables based on Excel headers.
- Supports Excel files with multiple sheets.
- Automatic insert/update data handling.
- Unique key support to prevent duplicates.
- Dynamic logs with filtering (insert, update, exists, error, info).
- Progress bar to track import progress.
- Connection error messages displayed in UI logs.
- Responsive UI built with Tailwind CSS and glassmorphism effects.

---

```

💻 Installation
--------------

[](#-installation)

```

```

Enstale via Composer:

```
composer require frantzley/excel-to-mysql

```

Estrikti Projet an
------------------

[](#estrikti-projet-an)

```

project-root/
├─ public/
│  ├─ index.php      # Upload form and UI
│  ├─ app.js         # JavaScript file
│  ├─ process.php    # Backend processing (pre-built)
├─ src/
│  └─ ExcelToMySQL.php
├─ uploads/          # Folder for uploaded files (auto-created if not exists)
├─ vendor/           # Composer dependencies

```

Asire w gen PhpSpreadsheet enstale:

```
composer require phpoffice/phpspreadsheet

```

⚡ Usage
-------

[](#-usage)

```
Open your browser at public/index.php.

Select your Excel file, enter the table name in the database, and define a unique key if needed.

Click Upload & Import.

Logs will appear in real time with color indicators:

Blue → new insert
Yellow → already exists
Red → error

```

🔧 Column Mapping
----------------

[](#-column-mapping)

```
Automatic: The first row in the Excel file is used as headers; database columns will match these names.

Manual: You can customize column mapping if needed:

$importer->setMapping([
    "Excel Name"  => "db_name",
    "Excel Email" => "db_email"
]);

The table will be created automatically based on the mapping.

```

📦 Example pou test PHP Usage
----------------------------

[](#-example-pou-test-php-usage)

```
