导出到Excel [英] Exporting to Excel

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

问题描述

大家好,

在Access97中,我有一张表超过65k的记录,而且我是

寻找VBA导出记录的方法到Excel。


任何人都有vba代码从访问excel导出并拥有代码

在工作簿中使用多个excel选项卡????


任何人都有vba代码会创建一个临时表写入65,000

记录到它,导出那些excel,清理临时表,追加

接下来65,000条记录,用不同的名字将它导出为ex​​cel,清除
临时表等等.......直到它获取所有记录

源表导出???


谢谢

bobh。

Hi All,
In Access97 I have a table that''s greater than 65k records and I''m
looking for a VBA way to export the records to Excel.

Anyone have vba code to export from access to excel and have the code
use multiple excel tabs within a workbook????

Anyone have vba code that would create a temp table write 65,000
records to it, export those to excel, clean the temp table, append the
next 65,000 records, export it to excel with a different name, clear
the temp table, etc............ til it gets all the records from the
source table exported ???

thanks
bobh.

推荐答案

Bob,


首先查看帮助文件中的Transferspreadsheet方法。

DoCmd.TransferSpreadsheet ........可用于将数据从Access导出到

Excel。


-

PC数据表

您的资源获取Access,Excel和Word应用程序的帮助

超过1150位用户来自新闻组请求帮助
re******@pcdatasheet.com


" bobh" < VU ****** @ isp.com>在消息中写道

news:11 ********************** @ t31g2000cwb.googlegr oups.com ...
Bob,

Start by looking at the Transferspreadsheet method in the Help file.
DoCmd.TransferSpreadsheet........ can be used to export data from Access to
Excel.

--
PC Datasheet
Your Resource For Help With Access, Excel And Word Applications
Over 1150 users have come to me from the newsgroups requesting help
re******@pcdatasheet.com

"bobh" <vu******@isp.com> wrote in message
news:11**********************@t31g2000cwb.googlegr oups.com...
大家好,
在Access97中,我有一张超过65k的记录表,我正在寻找一种将记录导出到Excel的VBA方式。

任何人都有从访问excel导出的vba代码,并且代码
在工作簿中使用多个excel选项卡????

任何人都有vba代码可以创建一个temp表写65,000
记录,导出那些excel,清理临时表,追加下65,000条记录,用不同名称导出excel,清除临时表等............直到它从
源表中导出所有记录???

感谢
bobh。
Hi All,
In Access97 I have a table that''s greater than 65k records and I''m
looking for a VBA way to export the records to Excel.

Anyone have vba code to export from access to excel and have the code
use multiple excel tabs within a workbook????

Anyone have vba code that would create a temp table write 65,000
records to it, export those to excel, clean the temp table, append the
next 65,000 records, export it to excel with a different name, clear
the temp table, etc............ til it gets all the records from the
source table exported ???

thanks
bobh.



PCD写道:
Bob,

首先查看帮助文件中的Transferspreadsheet方法。
DoCmd.TransferSpreadsheet ........可以用于将数据从Access导出到
Excel。
Bob,

Start by looking at the Transferspreadsheet method in the Help file.
DoCmd.TransferSpreadsheet........ can be used to export data from Access to
Excel.




史蒂夫,这里只是一个建议 - 为什么你不偶尔尝试阅读
在发布广告之前,我需要
OP。


-

到原始海报:


人们普遍认为这些新闻组是免费的b
交换信息。请注意,PC数据表

是一个臭名昭着的求职者。如果你正在考虑与他做生意,那么我建议你先看看下面的链接



http://home.tiscali.nl/arracom/whoissteve.html


Randy Harris



Steve, just a suggestion here - Why don''t you occasionally try reading
the OP before posting your advertising.

--
To the original poster:

It is commonly accepted that these newsgroups are for free
exchange of information. Please be aware that PC Datasheet
is a notorious job hunter. If you are considering doing
business with him then I suggest that you take a look at
the link below first.

http://home.tiscali.nl/arracom/whoissteve.html

Randy Harris


bobh写道:
大家好,
在Access97我有一张桌子这是超过65k的记录,我正在寻找一种VBA方式将记录导出到Excel。

任何人都有vba代码从访问excel导出并拥有代码
在工作簿中使用多个excel选项卡????

任何人都有vba代码,可以创建一个临时表写入65,000
记录,将它们导出到excel,清理临时表,附加
接下来的65,000条记录,用不同的名称将其导出为ex​​cel,清除临时表等等............直到它获得全部来自
来源标签的记录le export ???

感谢
bobh。
Hi All,
In Access97 I have a table that''s greater than 65k records and I''m
looking for a VBA way to export the records to Excel.

Anyone have vba code to export from access to excel and have the code
use multiple excel tabs within a workbook????

Anyone have vba code that would create a temp table write 65,000
records to it, export those to excel, clean the temp table, append the
next 65,000 records, export it to excel with a different name, clear
the temp table, etc............ til it gets all the records from the
source table exported ???

thanks
bobh.




鲍勃,我想你在这里真的有两个独立的问题。也许两个更容易的是将数据发送到Excel中的多个工作表。我/ b $ b可以提供一些示例代码来做到这一点。但是,我认为,你首先需要弄清楚如何将数据分解为块。你可以使用GetRows方法获取第一个,比如50K行,但是我不知道你怎么会得到下一组。唯一的

显而易见发生在我身上的方法是设置一个巨大的记录集

并以蛮力

方法逐步完成所有记录。我怀疑别人会有一个更优雅的

解决方案。


-

Randy Harris

tech at promail dot com

我很确定我知道我能记住的一切。



Bob, I think you''ve really got two seperate issues here. Perhaps the
easier of the two is to send the data to multiple sheets in Excel. I
can supply some sample code to do that. I think, however, you first
need to figure out how to the break up the data into "chunks". You
could use the GetRows method to grab the first, say 50K rows, but I''m
not entirely sure how you would then get the next sets. The only
"obvious" method that occurs to me, would be to set up a giant recordset
and go through all of the records incrementally in a "brute force"
approach. I suspect that someone else will have a much more elegant
solution.

--
Randy Harris
tech at promail dot com
I''m pretty sure I know everything that I can remember.


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

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