Wrox Programmer Forums
Go Back   Wrox Programmer Forums > Microsoft Office > Access and Access VBA > Access
| Search | Today's Posts | Mark Forums Read
Access Discussion of Microsoft Access database design and programming. See also the forums for Access ASP and Access VBA.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the Access section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
  #1 (permalink)  
Old January 4th, 2007, 05:47 PM
Registered User
 
Join Date: Oct 2006
Location: Leigh, Lancashire, United Kingdom.
Posts: 41
Thanks: 0
Thanked 0 Times in 0 Posts
Default Exporting more that 65536 lines to excel

Hi Guys,

Need a bit of guidance. I am writing a procedure that exports over the maximum to excel. Now I know that we could do this to .CSV, however the person needs this in excel to be able to open and do pivots etc etc. My problem is that I need to be able to split this onto multiple sheets. I have got the recordset open with all the records.

I have now come to the stage where I just can't think anymore. Can someone give me the guidance I am looking for. I know about the offset and counting the records. Its just getting it all into the right order.

All help is much appreciated
  #2 (permalink)  
Old January 5th, 2007, 08:23 AM
Friend of Wrox
Points: 9,611, Level: 42
Points: 9,611, Level: 42 Points: 9,611, Level: 42 Points: 9,611, Level: 42
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: Mar 2004
Location: Washington, DC, USA.
Posts: 3,069
Thanks: 0
Thanked 10 Times in 10 Posts
Default

You could create a query, and then set it to TOP 65000.

Then do a second query to find unmatched from your table to the TOP 65000 query (hopefully you don't have more than 130000 records.)

Then export the TOP 65000 query, and then export the find unmatched query. Too simple?

HTH

mmcdonal
  #3 (permalink)  
Old January 5th, 2007, 10:01 AM
Friend of Wrox
 
Join Date: Sep 2003
Location: Salisbury, Wiltshire, United Kingdom.
Posts: 155
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via Yahoo to leehambly
Default

There is a cunning little trick, if you name the qry doing the work X and the workbook Y, when you add subsequent X+1 qry's to the Y workbook, the X+1 data will go into its own worksheet...

X and X+1 must be named differently though, the qry themselves.

Food for thought
  #4 (permalink)  
Old January 5th, 2007, 11:11 AM
Registered User
 
Join Date: Oct 2006
Location: Leigh, Lancashire, United Kingdom.
Posts: 41
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Thanks Guys, See went brain dead last night. I will certainly look at this and let you know.

Thanks again


Similar Threads
Thread Thread Starter Forum Replies Last Post
ASP to Excel BUT show Excel grid lines mat41 Classic ASP Basics 8 May 31st, 2009 05:56 PM
Read Excel Lines VBA gbvdh VB How-To 0 February 26th, 2007 08:44 AM
exporting to excel caveatashish Classic ASP Basics 0 November 3rd, 2006 05:08 AM
Increase row height in Excel and multiple lines in jmss66 VB How-To 4 June 23rd, 2006 05:45 AM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.