jinyuttt

导航

2011年7月11日

查看excel文件和导出

摘要: public System.Data.DataTable dsmdata()//查看 { public static string strCon = " Provider = Microsoft.Jet.OLEDB.4.0 ; Data Source =d:\\csd.xls;Extended Properties=Excel 8.0"; OleDbConnection conn = new OleDbConnection(strCon); string sql = "select * from [Sheet1$]"; conn.Open(); OleD 阅读全文

posted @ 2011-07-11 20:08 代码苦行僧 阅读(685) 评论(0) 推荐(0) 编辑

查看csv文件导出csv文件c#

摘要: public DataTable ReadCSV(string pathcsv,string FileName) { OleDbConnection OleCon = new OleDbConnection(); OleDbCommand OleCmd = new OleDbCommand(); OleDbDataAdapter OleDa = new OleDbDataAdapter(); DataSet dsCsvData = new DataSet(); OleCon.ConnectionString = "Provider=Microsoft.Jet.OLEDB.4.0;Da 阅读全文

posted @ 2011-07-11 20:02 代码苦行僧 阅读(2186) 评论(0) 推荐(0) 编辑