Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to import an excel file in to a MySQL database

Tags:

mysql

excel

Can any one explain how to import a Microsoft Excel file in to a MySQL database?

For example, my Excel table looks like this:

Country   |   Amount   |   Qty ---------------------------------- America   |   93       |   0.60  Greece    |   9377     |   0.80  Australia |   9375     |   0.80 
like image 440
Fero Avatar asked Aug 21 '09 05:08

Fero


People also ask

How do I import a csv file into MySQL?

The following are steps that you want to import data into a table: Open table to which the data is loaded. Review the data, click Apply button. MySQL workbench will display a dialog “Apply SQL Script to Database”, click Apply button to insert data into the table.


1 Answers

There's a simple online tool that can do this called sqlizer.io.

Screenshot from sqlizer.com

You upload an XLSX file to it, enter a sheet name and cell range, and it will generate a CREATE TABLE statement and a bunch of INSERT statements to import all your data into a MySQL database.

(Disclaimer: I help run SQLizer)

like image 132
d4nt Avatar answered Sep 30 '22 02:09

d4nt