将查询导出为共享工作簿
我有代码可以迭代我选择的查询并将它们导出为标准 .xls 文件。
我的问题是,如何将它们导出为共享工作簿?
一个工作团队使用大约 20 个工作簿,他们必须手动将它们设置为共享,以便他们都可以同时访问它们。
目前,为了输出,我运行命令:
DoCmd.OutputTo acQuery, Query, acFormatXLS, output_folder & DirectoryFriendlyQuery & ".xls", False, "", 0
I've got code that'll iterate through my queries of choice and export them as standard .xls files.
My question is, how can I export these as Shared Workbooks?
A team at work uses about 20 workbooks, and they manually have to set them as shared so they all can access them at teh same time.
Currently, to output, I run the command:
DoCmd.OutputTo acQuery, Query, acFormatXLS, output_folder & DirectoryFriendlyQuery & ".xls", False, "", 0
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
这似乎不在您的选择范围内。我不知道该怎么做。希望您可以在系统级别解决这个问题(换句话说,将它们全部放在 Access 上)。
This doesn't seem to be among your options. I don't see how to do it. Hopefully you can address this at the system level (in other words, get them all on Access).
您需要使用办公自动化。从 VBA IDE (alt+F11) >> 设置对 Microsoft Excel 对象库的引用工具>>参考。
为了加快速度,无需保存文件两次(一次在 access 中,另一次在 Excel 中),您可以在内存中创建工作表。
You'll need to use office automation. Set a reference to your Microsoft Excel object library from the VBA IDE (alt+F11) >> Tool >> References.
To make this a bit speedier by not having to save the file twice (one in access and again in excel) you can create the worksheet in memory.