Excel无法打开使用acSpreadsheetTypeExcel9创建的文件 [英] Excel can't open file created with acSpreadsheetTypeExcel9
问题描述
使用MS Office 2013。
Using MS Office 2013.
当我执行命令
When I execute the command
DoCmd.TransferSpreadsheet acExport,acSpreadsheetTypeExcel9,rs!query_name, reports_directory& rs!file_name
DoCmd.TransferSpreadsheet acExport, acSpreadsheetTypeExcel9, rs!query_name, reports_directory & rs!file_name
我得到一个.xlsx文件,但当我尝试在Excel 2013中打开它时,我收到消息
I get an .xlsx file, but when I try to open it in Excel 2013 I get the message
"Excel不能打开文件'Reg_List_By_Name.xlsx',因为文件格式或文件扩展名无效..."
"Excel cannot open the file 'Reg_List_By_Name.xlsx' because the file format or file extension is not valid..."
如果我将transferspreadsheet类型更改为acSpreadsheetTypeExcel8,则会创建一个Excel的.xls文件将打开,但基本字体总是很糟糕。
If I change the transferspreadsheet type to acSpreadsheetTypeExcel8 it creates an .xls file that Excel will open, but the base font is always crappy.
Office 2013生成无法打开的文件的任何想法?
Any ideas why Office 2013 produces a file it can't open?
谢谢。  ; -Fred
Thanks. -Fred
推荐答案
嗨Fred,
文件扩展名不一定表示类型你得到的文件。尝试使用acSpreadsheetType12Xml查看它是否有任何区别。
The file extension doesn't necessarily dictates the type of file you get. Try using acSpreadsheetType12Xml to see if it make any difference.
希望它有所帮助......
Hope it helps...
这篇关于Excel无法打开使用acSpreadsheetTypeExcel9创建的文件的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!