Improve company productivity with a Business Account.Sign Up

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 1069
  • Last Modified:

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 ?

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
zimmer9
Asked:
zimmer9
1 Solution
 
jefftwilleyCommented:
about 65000 or so
0
 
TimCotteeHead of Software ServicesCommented:
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
 
zimmer9Author Commented:
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
Easily Design & Build Your Next Website

Squarespace’s all-in-one platform gives you everything you need to express yourself creatively online, whether it is with a domain, website, or online store. Get started with your free trial today, and when ready, take 10% off your first purchase with offer code 'EXPERTS'.

 
GRayLCommented:
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
 
zimmer9Author Commented:
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
 
GRayLCommented:
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
 
dannywarehamCommented:
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
 
GRayLCommented:
Danny: I believe I said that in my post http:Q_21889007.html#16921011.

Ray
0
 
GRayLCommented:
Thanks, glad I could help.
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

Join & Write a Comment

Featured Post

Get 10% Off Your First Squarespace Website

Ready to showcase your work, publish content or promote your business online? With Squarespace’s award-winning templates and 24/7 customer service, getting started is simple. Head to Squarespace.com and use offer code ‘EXPERTS’ to get 10% off your first purchase.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now