Can anyone explain how to import a Microsoft Excel file into a MySQL database?
For example, my Excel table looks like this:
Country | Amount | Qty ------------------------------------------ America | 93 | 0.60 Greece | 9377 | 0.80 Australia | 9375 | 0.80
Export it into some text format. The easiest will probably be a tab-delimited version, but CSV can work as well.
Use the load data capability. See http://dev.mysql.com/doc/refman/5.1/en/load-data.html
Look half way down the page, as it will gives a good example for tab separated data:
FIELDS TERMINATED BY ‘\t’ ENCLOSED BY ‘’ ESCAPED BY ‘\’
Check your data. Sometimes quoting or escaping has problems, and you need to adjust your source, import command— or it may just be easier to post-process via SQL.
- 1How to dump and restore database in MongoDB
- 2How to 'git stash' an untracked file?
- 1How To Create a New User and Grant Permissions in MySQL
- 1How to know MySQL Database or Table Size
- 1Ignore everything in a directory except one file
- 1Is it possible to make Git “forget” about a file that was tracked but is now in .gitignore?
- 1How can I commit only some part of a file in Git?
- 1How to convert html tags from a database with twig?
- 0MySQL select records created before a certain time ago
- 8How to read PSD file format in C#?
- 0File transfer from Front to Back