EXPORT EXCEL DATA TO GRIDVIEW

Htwe Htwe

Total Post:3

Points:21
Posted by  Htwe Htwe
 1094  View(s)
Ratings:
Rate this:
Hi All,

To Export excel  data to gridview,I got  the error message like this
The Microsoft Office Access database engine could not find the object 'Sheet1$'.  Make sure the object exists and that you spell its name and the path name correctly.

         MyCommand = new OleDbDataAdapter("select * from [Sheet1$]", MyConnection);
         DtSet = new DataSet();
         MyCommand.Fill(DtSet,"[Sheet1$]");

Thanks in advance
Htwe Htwe

Answer

NEWSLETTER

Enter your email address here always to be updated. We promise not to spam!