开发者

How do I import Excel data into a MySQL table?

开发者 https://www.devze.com 2023-04-10 09:40 出处:网络
I have a table mileage_registrants which keeps users registration 开发者_JAVA百科data. It has a field department which is NULL for all users now. I want to insert department data from a .xlsx file int

I have a table mileage_registrants which keeps users registration 开发者_JAVA百科data. It has a field department which is NULL for all users now. I want to insert department data from a .xlsx file into table department. There are one thousand records so it is horrible for me to insert them by hand.

Is there anyway for me to get this done quickly?


Assuming you have access to PhpMyAdmin, you may want to export your xlsx to CSV format, then import it using PhpMyAdmin import tool.

Beware of the encoding though!


you can do it via excel itselfe.
Here you can find a quick tutorials of you to interact with excel from mysql

http://www.heritage-tech.net/908/inserting-data-into-mysql-from-excel-using-vba/
http://www.heritage-tech.net/267/interfacing-with-mysql-via-excel/
http://blog.tjitjing.com/index.php/2008/02/import-excel-data-into-mysql-in-5-easy.html

It is highly recommended to do a dry run before running on production

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号