try
{
string strConn = "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=C:\\BBB.xls;Extended Properties=Excel 9.0;";
OleDbConnection conn = new OleDbConnection(strConn); 
conn.Open(); 
DataSet ds = new DataSet();
OleDbDataAdapter da = new OleDbDataAdapter("select * from [BBB$]",strConn);
da.Fill(ds);
DataGrid1.DataSource = ds.Tables[0].DefaultView;
DataGrid1.DataBind();
}
catch(System.Exception ex)
{

Response.Write("<script>alert('" + ex.Message.ToString() + "')</script>");
}
?这段代码执行后,提示 “安装可能的 ISAM 驱动程序没找到。”,请问怎么解决!

解决方案 »

  1.   

    可能是Jet引擎出错或没安装,你把Access安装了试试
      

  2.   

    直接用C#操作Excelhttp://www.webmis.com.cn/GoldPrinter.ExcelExpert.htm
      

  3.   

    可以看看:
    http://dotnet.aspx.cc/ShowDetail.aspx?id=C673E2CD-3F1E-4919-8CE0-D69B894A0599
      

  4.   

    直接用C#操作Excelhttp://www.webmis.com.cn/GoldPrinter.ExcelExpert.htm
    ---------------------------------------------------------
    ---------------------------------------------------------对日项目,不让用其它的组件!
      

  5.   

    To:flygoldfish
    Access安装了*----------------------------------------------
    To:jxufewbt
    我就是看了这贴才这样做的
      

  6.   

    private DataSet doImport(string strFileName)
    {
    if (strFileName=="") return null;
                  
    strConn = "Provider=Microsoft.Jet.OLEDB.4.0;" +
    "Data Source=" +  strFileName + ";" +
    "Extended Properties=Excel 8.0;";
    OleDbDataAdapter ExcelDA = new OleDbDataAdapter("SELECT * FROM [Sheet1$]", strConn); DataSet ExcelDs = new DataSet(); try
    {
    ExcelDA.Fill(ExcelDs, "ExcelInfo");           
    }
    catch(Exception err)
    {
    System.Console.WriteLine( err.ToString() );
    }
    return ExcelDs;
    }
      

  7.   

    问题已解决,是因为
    string strConn = "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=C:\\BBB.xls;Extended Properties=Excel 9.0;";Excel 9.0 改成 Excel 8.0 就可以了,安装的Excel版本问题谢谢大家!