从MS Access打开Excel One Workbook多页 [英] Open Excel One Workbook Multiple Sheets from MS Access

查看:61
本文介绍了从MS Access打开Excel One Workbook多页的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在尝试从Access生成一个包含多个工作表的工作簿,但到目前为止我还没有想出如何执行此操作。如何使用3个单独的Access DAO记录集并生成相同的工作簿,每个RS使用单独的工作表?我想它可以做到,但我不知道如何去做。顺便说一下,使用一个单独的工作表生成工作簿的代码工作正常。我只想在同一个工作簿中一次生成所有工作表,而不是每个工作簿只生成一个工作表。

解决方案

有很多方法可以这样做,所以发布你的现有代码可以帮助我们提供符合您的方法的建议。否则我们可以发布各种非常正确的东西,但对你没什么帮助。


或者,如果你不知道这个存在,那么这个基本代码就是向Excel添加工作表:

展开 <跨度类= codeDivider > | <跨度类= codeLink的onclick = 全选(本);>选择 | Wrap | 行号


这是试图打开每个RS作为单独表格的代码在相同的工作簿(失败)

<跨度类= codeLink 的onclick =模糊(此, this.parentNode.parentNode,g etChildren(this),true);>展开 | 选择 <跨度类= codeDivider> | <跨度类= codeLink 的onclick = 自动换行(在此);>裹 <跨度类= codeDivider> | <跨度class =codeLinkonclick =LineNumbers(this);>行号


I am trying to generate one workbook with multiple worksheets from Access but so far I have not figured out how to do this. How does one go about taking 3 separate Access DAO recordsets and generate the same workbook with a separate worksheet per RS? I imagine it can be done, but am not sure how to go about doing it. By the way, the code for generating the Workbook with one individual worksheet is working fine. I would just like to generate all worksheets at once in the same workbook instead of just one sheet per each workbook.

解决方案

There are many ways of doing it so posting your existing code would help us to give suggestions that match your approach. Otherwise we could post all sorts of stuff that would be perfectly correct, yet not very helpful for you.


Or, in case you did not know that this existed, there is this basic code to add a worksheet to Excel:

Expand|Select|Wrap|Line Numbers


Here is the code attempting to open each RS as a separate sheet on the same workbook (failing)

Expand|Select|Wrap|Line Numbers


这篇关于从MS Access打开Excel One Workbook多页的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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