将excel表导入到mysql中最简单的方法是什么? [英] What is the easiest way to import an excel sheet into mysql

查看:172
本文介绍了将excel表导入到mysql中最简单的方法是什么?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个Excel表与一些cols,我想导入到mysql表。问题是在mysql表中有更多的列在表中(这是绝对好的)。将数据放在正确的字段中最简单的方法是什么?



我的解决方案将导出为csv,并通过php将其放在mysql中,但必须

解决方案

尽管 mysqlimport 解决方案是绝对可行的,它可能很麻烦( NULL 处理例如,如果你必须导入很多文件,或者你必须定期导入它们。我有时可以使用Toad®for MySQL ,它能够将XLS(X)文件直接导入MySQL。如果您现在只导入一些Excel数据,那么这肯定是过度的 - 但是它是一种替代方法,它可以自动化,因为Toad支持自动化工作流程。


I have an Excel sheet with some cols and i want to import those into the mysql table. The Problem is that there are more colums in the mysql table than in the sheet (which is absolutely fine). What would be the easiest way of getting the data in the right fields?

My solution would be export to csv and put it in mysql via php, but there has to be a way that is more simple.

解决方案

Although the mysqlimport solution is absolutely feasible, it can be cumbersome (NULL handling e.g.) if you have to import a lot of files or if you have to import them regularly. I sometimes use Toad® for MySQL which is able to directly import XLS(X) files into MySQL. This surely is overkill if you only import some Excel data now and then - but it's an alternative and it can be automated as Toad supports automation workflows.

这篇关于将excel表导入到mysql中最简单的方法是什么?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆