摘要:
Response.Write(Server.MapPath("test.xls")+"<BR>"); string strPath = Server.MapPath("test.xls"); DataSet ds = ExcelToDS(strPath); //获取字段名称 //Response.Write(ds.Tables[0].Columns[1].ColumnName.ToString()); //获取表格名称 //Response.Write(ds.Tables[0].TableName); //获取DATASE 阅读全文
posted @ 2011-07-07 18:05
hellowing
阅读(359)
评论(0)
推荐(0)
摘要:
方法代码: public DataSet ExcelToDS(string Path) { //定义EXCEL文件链接字符串 string strConn = "Provider=Microsoft.Jet.OLEDB.4.0;" + "Data Source=" + Path + ";" + "Extended Properties=Excel 8.0;"; //实例化OledConnection链接 OleDbConnection conn = new OleDbConnection(strConn); //打 阅读全文
posted @ 2011-07-07 14:14
hellowing
阅读(438)
评论(0)
推荐(0)

浙公网安备 33010602011771号