| Author: Anjum Rizwi 14 Sep 2007 | Member Level: Silver | Rating: Points: 2 |
Hi Subhrangshu Banerjee, Please follow these sample instruction
public void UploadData() { string uploadedFilePath = UploadFile(); string strConnectionString = "Provider Name=" + uploadedFilePath;
DataSet ds = new DataSet(); //A-Z is column number of excel file OleDbDataAdapter da = new OleDbDataAdapter("SElect * from [A-Z]", strConnectionString);
da.Fill(ds); GridView1.DataSource = ds; GridView1.DataBind(); } private string UploadFile() { //write code here for upload string uploadedFilePath; //Assign uploaded physical path return uploadedFilePath; }
|