我得到了一个excel文档,其中包含关于不同大使馆的信息,他们的联系电话等。大多数这些信息已经在数据库中,但我需要从这个文件(电子邮件)中提取一列,并将其插入到数据库中的特定列(电子邮件)。
这是可能的吗?或者您是否可以只导入数据库中所需内容的精确副本?
谢谢你的帮助
发布于 2011-04-19 21:11:36
Export the table from phpmyadmin as CSV for excel -
drag it into excel -
add the desired column -
Save -
export the table again from phpmyadmin as .sql -
copy the table creation(Not the data) -
delete the table from phpmyadmin-
Run the table creation query so you now have a blank table -
Import the excel csv.重要提示:备份数据库
发布于 2011-04-19 21:03:46
您可能想用php-excel-reader编写一个脚本,它遍历文件中的每一行,并更新相应的数据库行。我不认为你可以在phpMyAdmin中“选择性地”导入一个文件。
https://stackoverflow.com/questions/5716729
复制相似问题