How to convert excel to MySQL database

Asked By 0 points N/A Posted on -
qa-featured

Hello experts,

Is there a way to convert excel to mysql database? Or is there a program that can do converting from excel spreadsheet to mysql database? Please tell me how to do it. Can you give me links where I can download it? Thank you..

SHARE
Answered By 0 points N/A #159682

How to convert excel to MySQL database

qa-featured

To import data from Excel is very easy using the MySQL Command prompt and the LOAD DATA command.

Save your Excel file as a csv file (use Excel 2007).

Open a text editor like note pad and check what it actually looks like.

Start the MySQL Command Prompt

Enter this command:

 LOAD DATA LOCAL INFILE ‘C:\temp\yourfile.csv’ INTO TABLE database.table FIELDS TERMINATED BY ‘;’ ENCLOSED BY ‘”‘ LINES TERMINATED BY ‘rn’ (field1, field2);

[Edit: Make sure to check whether you're using single quotes (') and double quotes (") if you copy and paste this code – it seems WordPress is changing them into some similar but different characters]

Related Questions