Set it up as a DTS job, using a server connection and an Excel connection.
Tie 'em together with a Transform Data Task.
Put your query into that.
Save.
Run.
The only problem you might run into is if your spreadsheet gets full.
"lh2001" <member38127 (AT) dbforums (DOT) com> wrote
Quote:
Hi,
I have a query ( Using sql) containing data that i need to export
into excel.
I am currently exporting it by cut and paste the data, it is
not a very intuitive way of doing things, what i would prefer is if i
could have a button on a form which when it was clicked, it
automatically exported the query to a Excel file. Can anyone help me
with the VBA that would be neccessary, so i can connect excel and ms sql
--
Posted via http://dbforums.com |