Solved

What is the maximum number of rows that can be output to Excel from Access when using the DoCmd.OutputTo command with an Access report ?

Posted on 2006-06-16
9
1,006 Views
Last Modified: 2008-01-09
What is the maximum number of rows that can be output to Excel from Access when using the DoCmd.OutputTo command with an Access report ?
I am using Access as the front end and SQL server as the back end database.

DoCmd.OutputTo acOutputReport, "rptDtlBranchAll", acFormatXLS, ExportedFile
0
Comment
Question by:zimmer9
9 Comments
 
LVL 34

Expert Comment

by:jefftwilley
ID: 16920710
about 65000 or so
0
 
LVL 43

Expert Comment

by:TimCottee
ID: 16920752
Hi zimmer9,

Depending on the version of excel it varies, though 65536 is the max number of rows that the later versions can manage.

Tim Cottee
0
 

Author Comment

by:zimmer9
ID: 16920946
If I am using Microsoft Excel 2003 and in the references, I have Microsoft Excel 11.0 Object Library, then how many rows do you think the max would be ?



0
 
LVL 44

Expert Comment

by:GRayL
ID: 16921011
You can export 65536 records per worksheet in a workbook.  However, in a workbook you can have up to 255 pages I believe, so with careful manipulation of your export, you can cram a lot of data into a workbook.
0
Backup Your Microsoft Windows Server®

Backup all your Microsoft Windows Server – on-premises, in remote locations, in private and hybrid clouds. Your entire Windows Server will be backed up in one easy step with patented, block-level disk imaging. We achieve RTOs (recovery time objectives) as low as 15 seconds.

 

Author Comment

by:zimmer9
ID: 16921888
Is there a limit as to how many report pages can be exported perhaps due to page breaks ?

When I run the report from the Access Reports object, it totals 800 pages.

When the following line executes:

DoCmd.OutputTo acOutputReport, "rptDtlBranchA", acFormatXLS, ExportedFile

I get a run time error 2306
There are too many rows to output based on the limitation specified by the output format or by Microsoft Access.
0
 
LVL 44

Accepted Solution

by:
GRayL earned 500 total points
ID: 16923482
VB Editor (Ctl-G) click Help, Answer Wizard, type Specifications, and click on - Read about form and report specifications.  Does that answer you question?  I'm running A2K and according to the Specification, I can run a report with 65535 pages.
0
 
LVL 26

Expert Comment

by:dannywareham
ID: 16929330
For info - Office 12 Excel (should be out in October) can handle 1 million rows (about time!)

Also, if you need to export more than 65535 rows, you can loop through teh data and put the first 65k on one worksheet, then move to next worksheet etc...

Idea..?
0
 
LVL 44

Expert Comment

by:GRayL
ID: 16930073
Danny: I believe I said that in my post http:Q_21889007.html#16921011.

Ray
0
 
LVL 44

Expert Comment

by:GRayL
ID: 16962834
Thanks, glad I could help.
0

Featured Post

Get up to 2TB FREE CLOUD per backup license!

An exclusive Black Friday offer just for Expert Exchange audience! Buy any of our top-rated backup solutions & get up to 2TB free cloud per system! Perform local & cloud backup in the same step, and restore instantly—anytime, anywhere. Grab this deal now before it disappears!

Join & Write a Comment

The first two articles in this short series — Using a Criteria Form to Filter Records (http://www.experts-exchange.com/A_6069.html) and Building a Custom Filter (http://www.experts-exchange.com/A_6070.html) — discuss in some detail how a form can be…
In a multiple monitor setup, if you don't want to use AutoCenter to position your popup forms, you have a problem: where will they appear?  Sometimes you may have an additional problem: where the devil did they go?  If you last had a popup form open…
In Microsoft Access, learn the trick to repeating sub-report headings at the top of each page. The problem with sub-reports and headings: Add a dummy group to the sub report using the expression =1: Set the “Repeat Section” property of the dummy…
In Microsoft Access, when working with VBA, learn some techniques for writing readable and easily maintained code.

746 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

12 Experts available now in Live!

Get 1:1 Help Now