如题用ado来新建一个excel文件,不需要任何设置就是一个空的excel就行

解决方案 »

  1.   

    ado不能新建excel文件,但能创建工作表.
      

  2.   

    http://www.codeproject.com/KB/database/connectionstrings.aspx
    # Connecting to an Excel Spreadsheet using the JET OLE DB Provider:
    CollapsestrConnect = _T("Provider=Microsoft.Jet.OLEDB.4.0;"
            "Data Source=C:\\DatabasePath\\DBSpreadSheet.xls;"
            "Extended Properties=\"\"Excel 8.0;HDR=Yes;\"\";");Note: If "HDR=Yes", the provider will not include the first row of the selection into the recordset. If "HDR=No", the provider will include the first row of the cell range (or named ranged) into the recordset.For more information, see: Q278973.
    用SQL的Create Table创建新表,有个现成的封装类CSpreadSheet,你搜下。