Posted by: bobbhai April 5, 2015
dot net help
Login in to Rate this Post:     0       ?        
i did different approach. with this i got an error "Could not find installable ISAM"..


string path = string.Concat((Server.MapPath("~/Upload/" + FileUpload1.FileName)));
FileUpload1.PostedFile.SaveAs(path);
OleDbConnection con = new OleDbConnection("Provider=Microsoft.Ace.OLEDB.12.0;Data Source=‪" + path + ";Extended Propertities=Excel 12.0");
OleDbCommand cmd = new OleDbCommand("select * from[Sheet1$]", con);
OleDbDataAdapter objAdapter = new OleDbDataAdapter(cmd);
Read Full Discussion Thread for this article