Access 2013 accde文件无法导出到acFormatXLSX [英] Access 2013 accde file can't export to acFormatXLSX

查看:405
本文介绍了Access 2013 accde文件无法导出到acFormatXLSX的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个Access 2013数据库,并将其另存为accde文件以提供给最终用户.我注意到报告打印预览"在功能区上不再具有导出按钮.我不确定为什么它们在accdb中存在,但是在accde文件中消失了,并且无法使用Google进行解释来找到任何东西,但是我确实找到了很多文章,说您必须为Access to的运行时版本创建自己的功能区.导出到Excel.我没有使用运行时,但是我制作了自己的功能区并且它起作用了,但仅适用于.xls文件格式.当我尝试将其保存到.xlsx时出现错误:

I have an Access 2013 database and I saved it as an accde file to give to the end users. I noticed that the Report Print Preview no longer had the export buttons on the ribbons. I am not sure why they are there in the accdb but gone in the accde file and could not find anything using Google to explain this but I did find a lot of articles saying you had to make your own ribbon for the runtime version of Access to export to Excel. I am not using the runtime but I made my own ribbon and it worked, but only for the .xls file format. When I try to save it to .xlsx I get a error:

运行时错误'2282':尝试输出当前对象的格式不可用."

"Run-time error '2282': The format in which you are attempting to output the current object is not available."

我在网络上发现了几篇文章说这行得通,但没有细节,并且有很多有关Excel导出的Access 2007错误/已删除功能的文章,但我使用的是2013,因此不相关.

I have found a few posts on the web that says this works but with no detail and a lot of posts about Access 2007 bug/removed feature regarding Excel exports not working but I am using 2013 so not relevant.

所以代码很简单:

DoCmd.OutputTo acOutputReport, "MyReport", acFormatXLSX, "File Name"

我也尝试添加参考.我目前按照优先顺序有以下参考文献: Visual Basic应用程序 Microsoft Access 15.0对象库 OLE自动化 Microsoft Office 15.0 Access数据库引擎对象库 Microsoft Internet控件 Microsoft Office 15.0对象库 Microsoft Excel 15.0对象库 Microsoft数据访问组件的安装版本

I have also tried adding references. I currently have following references in this order of priority: Visual Basic For Applications Microsoft Access 15.0 Object Library OLE Automation Microsoft Office 15.0 Access database engine Object Library Microsoft Internet Controls Microsoft Office 15.0 Object Library Microsoft Excel 15.0 Object Library Microsoft Data Access Components Installed Version

简短的问题是,是否可以使用Access 2013导出到XSLX?如果是的话,我在做什么错了?

感谢您在这里阅读全文.

Thanks for reading all the way down here.

推荐答案

无法将报表导出到Excel 2013.显然,由于导出报告的用户体验较差,因此未专门包含该文件.我可以想象跨越许多单元格的标签可能会变得凌乱.

Exporting a report to Excel 2013 in not available. Apparently it was specifically not included due to poor user experience with exporting reports. I can imagine that labels spanning across many cells etc could get messy.

如果要导出到Excel,可以将查询导出到Excel吗?还是仅导出为PDF?

If you are exporting to Excel, could you export a query into Excel ? Or just export into PDF ?

您还可以使用模板excel文件,然后将数据导出到范围中.

You can also use a template excel file and then export data into a range.

从此向下滚动至support.office.com上的链接准备导出操作,在具有格式设置部分下查看.

From this link on support.office.com scroll down to Prepare for the export operation, look under section With Formatting.

有一个脚注1.选择目标工作簿和文件格式.请注意,报告只能以较旧的* .xls文件格式导出,而不能以较新的* .xlsx文件格式导出.

There is a foot note 1. Choose the destination workbook and file format. Note that reports can only be exported in the older *.xls file format, not in the newer *.xlsx file format.

这篇关于Access 2013 accde文件无法导出到acFormatXLSX的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆