【问题标题】:Export MS Access 2010 table to Excel 2010将 MS Access 2010 表导出到 Excel 2010
【发布时间】:2015-06-26 10:00:44
【问题描述】:

我在使用一些代码从 MS Access 2010 中以 Excel 2010 格式导出表格时遇到问题。代码在 Access 中运行良好并创建了文件。但是,当我尝试在 Excel 2010 中打开文件时,我收到如下错误消息:

Excel 无法打开文件,因为文件格式或文件扩展名无效。

这是代码

      DoCmd.TransferSpreadsheet transfertype:=acExport, _
      spreadsheettype:=acSpreadsheetTypeExcel12, _
      TableName:="Table1", FileName:="C:\MyDocuments\Myfile.xlsx"

在此先感谢

M

【问题讨论】:

    标签: excel export


    【解决方案1】:

    请改用acSpreadsheetTypeExcel12Xml,因为acSpreadsheetTypeExcel12 会导致版本问题(不一致)...

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2016-10-05
      • 2012-08-06
      • 1970-01-01
      相关资源
      最近更新 更多