Converting Your Excel Worksheet into a Working MySQL Database - Exact steps in an online MySQL server (where direct file import is not allowed)
(Page 4 of 4 )
Below are the steps necessary to import Excel worksheet data into a MySQL table in an actual MySQL database for real websites (not using XAMPP localhost):
1. Do Steps 1 to 5 in the XAMPP Phpmyadmin methods above.
2. Then go to http://csv2sql.evandavey.com/ . This will convert csv data into MySQL insert statements.
3. Type the exact table name you have created using above steps.
4. Browse to the location of the CSV file you have saved in the above steps.
5. Set the “Mode” to “Insert Statements.”
6. Leave the “Primary Key Field (Update Only):” blank.
7. After all are set, click “GO”
8. Then go to the “SQL” tab (you will find this at the top navigation of phpmyadmin) under the MySQL database table you have created in the above steps.
9. Copy and paste the result in Step 7 in the phpmyadmin SQL query box. It should like the image below:

10. After everything is set, click “GO.”
11. Click “Browse” and you can now see your Excel Worksheet being transformed into a MySQL table.
If you need to export several Excel worksheets as another MySQL table, repeat procedure 1 to 9 above.
If you have any questions, just comment on this post.
| DISCLAIMER: The content provided in this article is not warranted or guaranteed by Developer Shed, Inc. The content provided is intended for entertainment and/or educational purposes in order to introduce to the reader key ideas, concepts, and/or product reviews. As such it is incumbent upon the reader to employ real-world tactics for security and implementation of best practices. We are not liable for any negative consequences that may result from implementing any information covered in our articles or tutorials. If this is a hardware review, it is not recommended to open and/or modify your hardware. |