MySQL Forums
Forum List  »  Microsoft Access

Re: Excel data to mysql database
Posted by: David West
Date: March 13, 2010 01:33AM

There are several options as indicated by the Devart Team. Loading Excel files directly into mysql will generally need to be done using some kind of Migration Tool as mentioned.

Alternatively, you could convert (i.e., save as) the Excel file into a csv or txt file. You may need to modify the data set in the csv file depending on your data types and use of the data. For example, you may need to format dates as yyyy-mm-dd and numerical values as "number" without the comma and finally, you may have to find and replace empty cells with a blank space using Excel's find-replace function. Otherwise, see the simple example below.

The Load Date Infile ...will depend on your permissions..check with admin.

Create table load_csv_table(
Field1 varchar(50),
Field2 varchar(50),
Field1 varchar(50));

Load Data Infile 'load_csv_file1.csv'
Into load_csv_table
Fields Terminated by ','
Optionally Enclosed by '"' #this may or may not be required
Lines Terminated by '\r\n' #this may or may not be required
Ignore 1 Lines ;#if you have a header row that you don't need to insert

Options: ReplyQuote

Written By
March 12, 2010 04:17AM
March 12, 2010 07:45AM
Re: Excel data to mysql database
March 13, 2010 01:33AM
August 25, 2010 03:08AM
November 08, 2010 01:14PM

Sorry, you can't reply to this topic. It has been closed.

Content reproduced on this site is the property of the respective copyright holders. It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.