Web-en

How to import an Excel file in a MySQL database in PHPMyAdmin

It is sometimes easier to work on some data in Excel, before importing in a MySQL database.

In order to do so, here are a few simple steps.

In short : export the Excel file to CSV, and import the CSV in a new table using the PHPMyAdmin interface.

Starting with an Excel, in below example one sheet containing some data

How to import an Excel file in a MySQL database in PHPMyAdmin : Excel sheet with data
Excel sheet with data

Select Save As to be able to select another format

How to import an Excel file in a MySQL database in PHPMyAdmin : Excel option Save as
Excel option Save as

Scroll down to the CSV (Comma delimited) (*.csv) format

How to import an Excel file in a MySQL database in PHPMyAdmin : Finding the CSV comma separated format
Finding the CSV comma separated format

Confirm that some features will be lost – CSV being a text format, no Excel specifics will be exported (functions, programs, …)

How to import an Excel file in a MySQL database in PHPMyAdmin : Confirm the loss of Excel specific functions
Confirm the loss of Excel specific functions

In PHPMyAdmin, go to the Import menu

How to import an Excel file in a MySQL database in PHPMyAdmin : Import menu in PHPMyAdmin
Import menu in PHPMyAdmin

Browse for the CSV file recently saved, and select the appropriate format

How to import an Excel file in a MySQL database in PHPMyAdmin : Browse for local file and select appropriate CSV format
Browse for local file and select appropriate CSV format

Look for other options that might apply, for example, if columns have names, check the corresponding option “The first line of the file contains the table column names“, and click Go

How to import an Excel file in a MySQL database in PHPMyAdmin : CSV import specific options
CSV import specific options

Import confirmation should be displayed, and links to the resulting database and table will be shown

How to import an Excel file in a MySQL database in PHPMyAdmin : Import results with links to database and table
Import results with links to database and table

It is now possible to browse through the table !

How to import an Excel file in a MySQL database in PHPMyAdmin : Database display
Database display

Using the diverse options, it is also possible to work on the table structure, content, or to move it to another database

How to import an Excel file in a MySQL database in PHPMyAdmin : Database structure
Database structure

40 Life-Changing Excel Tutorials – digital.com