访问Excel导出错误

时间:2016-03-10 20:39:09

标签: ms-access access-vba export ms-access-2010

我有一个ERROR: null value in column "name" violates not-null constraint DETAIL: Failing row contains (101, null, 23, 5, 65, 6, null, null). ********** Error ********** ERROR: null value in column "name" violates not-null constraint SQL state: 23502 Detail: Failing row contains (101, null, 23, 5, 65, 6, null, null). 将查询导出到Excel文件中但是当我打开Excel文件时,我收到一条错误消息,说明," Excel无法打开,因为文件格式和扩展名不是。有效"导出文件并尝试打开文件时会发生什么?

DoCmd

1 个答案:

答案 0 :(得分:1)

如果您希望 SpreadsheetType 选项acSpreadsheetTypeExcel9,请使用.xls作为文件扩展名。

如果您希望.xlsx作为文件扩展名,请对{em> SpreadsheetType 使用acSpreadsheetTypeExcel12Xml

发生错误是因为acSpreadsheetTypeExcel9.xlsx不是有效组合。