473,322 Members | 1,703 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,322 software developers and data experts.

how to export bulk of datas from a sql pass through query to an excel file???

hi ,
i want to export datas from a sql pass through query to an excel file. i tried this query
Expand|Select|Wrap|Line Numbers
  1. DoCmd.OutputTo acOutputQuery, "Q_3_Monthly_LC", acFormatXLS, txt, False
but it is not working. here Q_3_Monthly_LC is a sql pass through query and txt contains file path.
Oct 4 '12 #1
4 2863
twinnyfo
3,653 Expert Mod 2GB
Are there more than 16,000 records? This may be causing your problem.

What kind of error are you receiving?
Oct 4 '12 #2
i am getting the below error number and error message

2306,there are two many rows to output,based on the limitation specified
Oct 4 '12 #3
twinnyfo
3,653 Expert Mod 2GB
In earlier versions of Excel, this method is limited to about 16,000 rows of output. You must use acFormatXLSX as the argument, and use the proper file name (and have the proper version of Excel, too!).

Hope this helps.
Oct 4 '12 #4
zmbd
5,501 Expert Mod 4TB
Harinath88:
Is this is the same issue you had in:
http://bytes.com/topic/access/answer...ery-excel-file

If so, please do not double post... I'll leave this thread open for now; however, as I pointed out in the other thread... pass-thru queries do just that... by pass the jet/access control; therefore, with large record sets you will have alot of issues.
The only workaround is to pull the records into an Access table and then export that table.
You will have to also verify that the datatypes are acceptable to Excel or the transfer will puke.
Oct 4 '12 #5

Sign in to post your reply or Sign up for a free account.

Similar topics

2
by: Jochen Daum | last post by:
Hi, I'd like to pass through an Excel file from one server, (one secret password) to a user (different passwords). I thought I had duplicated the headers: $ch = curl_init();...
1
by: Benny Ng | last post by:
Hi,All, Export Method: ------------------------------------------------------------------------- strFileNameExport = "Results" Response.Clear() Response.Buffer = True...
6
by: jw | last post by:
i have datas in an excel file like this: names surnames jack white smith black marry brown how can i read these datas for ex i know that names in the cell A1 and surnames is...
0
by: Benny Ng | last post by:
Dear ALl, Now I want to export the crystal report to Excel file. But actually don't know how to export it with multiple sheet. Because sometime in some particular cases. It needs us to provided an...
2
by: aran | last post by:
I am trying to export each record in an Access database into its own separate Excel file. Is there an easy way to do this? Please dumb it down for me as much as possible. Thank you. Also is...
3
dbushcmohle
by: dbushcmohle | last post by:
Hello, I am having problems exporting a stored procedure's results to an Excel file... I've done this many times successfully, but never had to introduce a variable. Now that I've introduced...
1
by: egrill | last post by:
I have an Excel file that needs to be updated nightly and sent to a user. I can't find anyway using the existing marcos that would allow me to set a automated command to run the query on a scheduled...
0
by: JFKJr | last post by:
Hello everyone! I am trying to export Access table data into Excel file in such a way that the table field names should be in the first line of each column in excel file followed by field data, and...
1
by: baburmm | last post by:
Hi all, Can any one tell me, Export datas to a Excel file using query without openrowset method is there any other methods are posible for creating an Excel file to export it Thanks,...
6
by: srikanya | last post by:
Hi, I have a database with 10 tables and I want to export all table data into excel file.But there should be only one excel file with different sheets in it, each containing different tables data.
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
1
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
1
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
1
by: Shællîpôpï 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
0
by: af34tf | last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.