问题描述
大家好,
在Access97中,我有一张表超过65k的记录,而且我是
寻找VBA导出记录的方法到Excel。
任何人都有vba代码从访问excel导出并拥有代码
在工作簿中使用多个excel选项卡????
任何人都有vba代码会创建一个临时表写入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.
推荐答案
史蒂夫,这里只是一个建议 - 为什么你不偶尔尝试阅读
在发布广告之前,我需要
OP。
-
到原始海报:
人们普遍认为这些新闻组是免费的b
交换信息。请注意,PC数据表
是一个臭名昭着的求职者。如果你正在考虑与他做生意,那么我建议你先看看下面的链接
。
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
鲍勃,我想你在这里真的有两个独立的问题。也许两个更容易的是将数据发送到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的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!