请问怎么连?

解决方案 »

  1.   

    肯定是驱动不对
    'MICROSOFT.JET.OLEDB.4.0'
    ,'Excel 5.0;HDR=YES;IMEX=2;DATABASE=c:\a.xls'
    --,Sheet1$HDR=Yes;DATABASE=C:\'
      

  2.   

    不是,我调用阿ado控件,想在里面写connectionstring,连excel,不行.
      

  3.   

    Provider=MSDASQL.1;Persist Security Info=False;User ID=admin;Extended Properties="DBQ=C:\Documents and Settings\Administrator\My Documents\dfgdsf.xls;DefaultDir=C:\Documents and Settings\Administrator\My Documents;Driver={Driver do Microsoft Excel(*.xls)};DriverId=790;FIL=excel 8.0;FILEDSN=C:\Program Files\Common Files\ODBC\Data Sources\excel.dsn;MaxBufferSize=2048;MaxScanRows=8;PageTimeout=5;ReadOnly=1;SafeTransactions=0;Threads=3;UID=admin;UserCommitSync=Yes;";Initial Catalog=C:\Documents and Settings\Administrator\My Documents\dfgdsf
      

  4.   

    在Data Link Properties->Provider中选择Microsoft OLE DB Provider for ODBC Drivers就行了呀!
    其余的就是的步骤你应该会的!
      

  5.   

    'MICROSOFT.JET.OLEDB.4.0'
    ,'Excel 5.0;HDR=YES;IMEX=2;DATABASE=c:\a.xls'
    --,Sheet1$HDR=Yes;DATABASE=C:\'
      

  6.   

    看看这个帖子,也许对你有所帮助
    http://community.csdn.net/Expert/topic/2744/2744506.xml?temp=.7537653