MySQL FAQs
FAQs Categories
Client Server Commands
Database Structure
Table Types or Storage Engines
Indexes
SQL Statements
Table Joins
Funtions and Operators
Tricky Select Queries
Speed Up Queries
Data Back Up
General Questions
Errors
N.M.P.L. Company www.NearMePayday.Loan || 3-month (90 days)
Powered by MySQL
 
Home / Data Back Up / Import Data / Question No: 174

How to import data from Microsoft Excel file into table with LOAD DATA INFILE statement?

I am new to MySQL. I want to import data from Microsoft Excel file into MySQL table. Can you explain, how to import data from Microsoft Excel file into table with LOAD DATA INFILE statement?

Answer No: 174

MySQL LOAD DATA INFILE statement allows to import data into table. This statement facilitates to import data of several formats like csv data, Microsoft Excel file, text file and other delimited text files wide array of options that make this feature so powerful. The following is an example to import csv data into MySQL table:

LOAD DATA LOCAL INFILE authorlist.xls' INTO TABLE authors 
FIELDS TERMINATED BY '\t' ENCLOSED BY '\''
ESCAPED BY '\\' LINES TERMINATED BY '\n';

The target table, namely authors, should consists of same list of fields as in excel file.

Related MySQL FAQs to the Above FAQ

How-to-use-mysqlimport-client How to use mysqlimport client?

How-to-use-LOAD-DATA-INFILE-statement How to use LOAD DATA INFILE statement?

How-to-import-data-from-text-file-into-table-with-LOAD-DATA-INFILE-statement How to import data from text file into table with LOAD DATA INFILE statement?

About FAQs: Recently Added FAQs

About MySQL FAQs: Site Map | Bookmark Us | Recommend this Site to Your Friend | Contact Us

Useful Links: Wikipedia.org | Oracle.com | w3schools.com | www.php.net | Github.com

© 2021  www.mysqlfaqs.net
All rights reserved.