You can import Excel data to MySQL using a few lines of commands. Excel is a part of the Microsoft Office suite. You can use Excel to contain and analyse data and charts via its formulas and functions. You can also import and export data to and from Excel spreadsheets. MySQL is an open-source database management system. You can freely download and install it from MySQL website (see Resources.) MySQL features flexibility, ease of use, high expandability and capability. It provides an integrated work space for developers and data administrators.
- Skill level:
- Moderately Challenging
Other People Are Reading
Things you need
Double-click your Excel spreadsheet to open it. Click "File" and "Save As" to save your Excel data as a CSV file. Select "Other Formats" and enter a file name for the saved CSV file. Click "Save as Type," choose "Comma Delimiter (*.csv)" and click "Save" to save the file.
Right-click the CSV file and choose a text editor such as Ntepad to edit it. Make sure the words are separated properly by delimiters. It should look like "a, b, c ."
Click "Start" and "All Programs." Go to "MySQL Query Browser," "Tools" and "MySQL Command Line Client" to start the MySQL Command Prompt.
Enter the following code:
LOAD DATA LOCAL INFILE 'the path\yourfile.csv' INTO TABLE mysqldatabase.table FIELDS TERMINATED BY '' ENCLOSED BY "," 'LINES TERMINATED BY '\n' (field 1, field 2);.
Execute the code. This will import your CSV file into mysqldatabase.table. The columns in CSV are separated by commas and the execution will be terminated by "Enter key" '\n.'
- 20 of the funniest online reviews ever
- 14 Biggest lies people tell in online dating sites
- Hilarious things Google thinks you're trying to search for