string csvDirectory = Server.MapPath("~/media/"); string CsvFile = "SampleDirectory.csv"; DataSet ds = new DataSet(); OleDbConnection con = new OleDbConnection("Provider=Microsoft.Jet.OLEDB.4.0;Data Source=" + csvDirectory + ";Extended Properties='text;HDR=Yes;FMT=Delimited'"); OleDbDataAdapter ExcelAdapter = new OleDbDataAdapter("SELECT * FROM " + CsvFile, con); con.Open(); ExcelAdapter.Fill(ds); con.Close(); GridView1.DataSource = ds; GridView1.DataBind();
Read and share knowledge about Asp.Net, SharePoint, JavaScript and other Microsoft Technology.
Friday, May 7, 2010
Read CSV with oledb to dataset - datatable
Subscribe to:
Post Comments (Atom)
Emperor Casino - Shootercasino.com
ReplyDeleteIf you are interested in gambling, you are in the right place. 메리트 카지노 주소 For those 제왕카지노 looking to bk8 try an online casino you will find Emperor Casino online.