04
06/11
C#连接EXCEL数据库
using System.Data.OleDb; //命名空间 private void button1_Click(object sender, EventArgs e) { string strConn = @"Provider=Microsoft.Jet.OLEDB.4.0;Data Source=student.xls; Extended Properties=Excel 8.0;"; OleDbConnection conn = new OleDbConnection(strConn) string sql = "select * from [student$]"; //注意EXCEL数据库表形式 OleDbCommand cmd = new OleDbCommand(sql, conn); Ol...