简体   繁体   English

访问导出到Excel

[英]Access export to excel

I'm new to access and I need to know if anyone as information on how to export hard coded query to excel. 我是新手,我需要知道是否有人作为如何将硬编码查询导出到excel的信息。

Here's the query i'm trying to export to excel. 这是我要导出为ex​​cel的查询。 I think I might need to covert it to a recordset? 我想我可能需要将其隐藏到记录集?

If anyone has information i could read on the property i'm suppose to use let me know! 如果有人可以在该物业上阅读我想使用的信息,请告诉我! :D :d

whereAtt = "Select * from tblActionLog where LogID is not null"

Can you save your hard coded query as an Access Query? 您可以将硬编码查询另存为访问查询吗? If so, you can just make a button that when clicked runs this code: 如果是这样,您只需创建一个按钮,单击该按钮即可运行以下代码:

DoCmd.OutputTo acOutputQuery, "YourQueryName", acFormatXLS, , True DoCmd.OutputTo acOutputQuery,“ YourQueryName”,acFormatXLS 、、 True

Would be a lot easier than the other solution. 比其他解决方案容易得多。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM