有没有办法直接从MS Access表单生成Excel文件? [英] Is there a way to generate an Excel file directly from a MS Access form?

查看:97
本文介绍了有没有办法直接从MS Access表单生成Excel文件?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我目前有Access表单,其中列出了一系列用户可以运行的报告。用户单击命令按钮以创建这些报告,并生成a.pdf。我想知道是否有可能生成.xlsx文件而不是.pdf?此外,我在编码保存文件的位置时遇到问题,无论是.pdf还是.xlsx,因为用户通过Citrix访问Access应用程序。这可能应该作为一个单独的问题输入?谢谢..

I currently have Access form that lists a series of reports that the users can run. Users click a command button to create these reports, and a.pdf is generated. I am wondering if it is possible to generate an .xlsx file instead of the .pdf? Also, I have an issue in coding the location to save the files, whether they be .pdf or .xlsx, because the users access the Access app through Citrix. This perhaps should be entered as a separate question? Thank you..

推荐答案

3C4J5D:

这或许应该作为一个单独的问题输入?
3C4J5D:
This perhaps should be entered as a separate question?



绝对。


至于生成Excel文件,答案就是它当然是可能的。由于细节很少,并且没有任何尝试自己启动的迹象,我只能在此阶段指向 DoCmd.TransferSpreadsheet()函数。有更多选项,但我没有任何问题框架可以分享这些选项。

Absolutely.

As for generating Excel files the answer to that is it''s certainly possible. With so little detail and no signs of any attempt to start this yourself though, I can only point you towards the DoCmd.TransferSpreadsheet() function at this stage. There are more options, but I don''t have any question framework within which to share those.


目前,代码使用的是 DoCmd.OutputTo 。我试图使用这个命令,当我需要使用TransferSpreadsheet命令就是你所说的。
Currently, the code is using the DoCmd.OutputTo. I was trying to use this command, when I need to use the TransferSpreadsheet command is what you''re saying.
< span class =codeLinkonclick =Blur(this,this.parentNode.parentNode,getChildren(this),true);>展开 | 选择 | Wrap | 行号


3C4J5D:

当我需要使用TransferSpreadsheet命令时,你说的是
3C4J5D:
when I need to use the TransferSpreadsheet command is what you''re saying



的确如此。如果你以前使用过另一个,那么现在就看一下(因为 OutputTo 在这里没有帮助)。


这篇关于有没有办法直接从MS Access表单生成Excel文件?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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