/// 将csv格式文件导成dataset /// /// 文件路径 /// 文件名 /// public DataSet getCsv(string filePath, string fileName){string strConn = "Driver={Microsoft Text Driver (*.txt; *.csv)};Dbq="; strConn += filePath; strConn += ";Extensions=asc,csv,tab,txt;"; OdbcConnection con = new OdbcConnection(strConn); DataSet data = new DataSet(); string sql = "select * from " + fileName; OdbcDataAdapter adp = new OdbcDataAdapter(sql, con); con.Open();}然后你就插入数据库就可以了