SQLyog- Importing MS Excel table into MySQL Database

SQLyog Importing MS Excel table into MySQL Database Importing MS Excel tables into MySQL database takes more time and efforts while playing around the application development or any college assignments. This article explains how you can import large excel tables into MySQL database within few minutes without writing a code in any language like Java or C++. Here in this example, we are not going to write any SQL query to import tables. Although prerequisites for this exercise is MySQLyog.  

SQLyog Importing MS Excel table into MySQL Database

Follow below steps to import excel table into MySQL database:

  1. Open your Excel file which contains the data table and Save As a txt (Tab delimited) file as shown in below pictureExcel File:SQLyog- Importing MS Excel table into MySQL Database - excelTableSave As txt:SQLyog- Importing MS Excel table into MySQL Database - Save as txt


  2. Open the txt file and remove the headers from the file because headers are already present in the database schema.textFile


  3. Save the text file.
  4. Create the table into MySQL with the same column names which are present in your Excel table. The sequence of the columns must be the same as in Excel table.
    SQLyog- Importing MS Excel table into MySQL Database - DBSchema



  5. Now select the table from the database and go to the menu bar Table>Import>Import CSV Data using LOAD LOCAL.. or you can use Ctrl+Shift+M as shown in below image
    ImportCSV



  6. Select-  1. table name and columns, 2. set the delimiter details and 3. browse the txt file which is saved as tab separated file and click on import.SQLyog- Importing MS Excel table into MySQL Database - CSV settings


  7. Use select query to see the content of the table as shown in below picture

SQLyog- Importing MS Excel table into MySQL Database- SQLTable

Please connect via comments for more explanation or queries related to Mysql issues, we will happy to help you. www.ease2code.com

Comments

  1. Computer Science says:

    Thanks for ths great article, I have shared it on Facebook.

  2. Palmer Minelli says:

    Normally I don’t read article on blogs, but I wish to say that this write-up very forced me to try and do it! Your writing style has been surprised me. Thanks, quite nice article.

Speak Your Mind

*