Click here to Skip to main content
14,735,218 members
Please Sign up or sign in to vote.
1.00/5 (1 vote)
See more:
My code as follows

protected void btnimport_Click(object sender, EventArgs e)
   {
   string path = System.IO.Path.GetFileName(fileupload15.PostedFile.FileName);
   fileupload15.PostedFile.SaveAs(Server.MapPath("~/Import_Excel/" + path));
   GvSch.DataSource = ImportExcelXLS(path, false, out message);
   GvSch.DataBind();
}

i create a new folder name called Import_Excel in that folder i want to save the selected excel file.


In run mode i click the choose file and select the excel file and click import button

When i run the above code shows error as follows

ilistsource does not contain any data sources

please help me.
what is the mistake from my above code.

Regards,
Narasiman P.
Posted
Updated 27-Aug-14 23:34pm
v2
Comments
Tejas Vaishnav 28-Aug-14 4:35am
   
And what code you have written in ImportExcelXLS method. which you directly provide as GrdiView data source.

1 solution

Check this similar discussion

The IListSource does not contain any data sources.[^]
   

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)




CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900