Export to excel

R

Reggie

Hi and TIA. I'm trying to export a query, but get an error stating "to many
rows to output based on the limitations specified by the output format or my
database". I'm using A2K and Excel2000. The number of rows is @20,000. If
I export say 13,000 it works. I know the limitations of excel is around
65,536 rows by 256 columns. Code is below. Nothing fancy. Any advice is
appreciated. Thanks for your time.

DoCmd.OutputTo acQuery, strQuery, "MicrosoftExcel(*.xls)", , True


******************
Reggie
 
J

John Spencer

Output To conforms to an older version of Excel which only allows 16K
records (rows in Excel). You can try using

DoCmd.TransferSpreadsheet ...


--
John Spencer
Access MVP 2002-2005, 2007
Center for Health Program Development and Management
University of Maryland Baltimore County
..
 
G

Guest

Hi Reggie

OutputTo uses an older Excel format has a limit of 16384 rows.

Use TransferSpreadsheet which allows several formats.

DoCmd.TransferSpreadsheet acExport, acSpreadsheetTypeExcel9, strQuery,
"your_filename.xls"

Regards

Andy Hull
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top