Get SQL data to Excel without ODBC

  • Thread starter Thread starter Ken Valenti
  • Start date Start date
K

Ken Valenti

Is there a way of getting SQL data to Excel 97 without
having to setup an ODBC connection on a local machine?
 
Hi Ken,

Are you asking if it's possible to do this without setting up a DSN on the
client machine? Or are you asking if it's possible to do without using ODBC
at all?

--
Regards,

Jake Marx
MS MVP - Excel
www.longhead.com

[please keep replies in the newsgroup - email address unmonitored]
 
I am merely looking for a way to get SQL data to Excel
without having each machine manually setup an ODBC
connection.

I have 150 managers that would be accessing Excel reports
on their machines. I am hoping to have them push a button
and not have to manually create an ODBC connection on
their local machine. So if Excel can setup the connection
using VBA, this would be ideal. It only has to be read-
only.



-----Original Message-----
Hi Ken,

Are you asking if it's possible to do this without setting up a DSN on the
client machine? Or are you asking if it's possible to do without using ODBC
at all?

--
Regards,

Jake Marx
MS MVP - Excel
www.longhead.com

[please keep replies in the newsgroup - email address unmonitored]


Ken said:
Is there a way of getting SQL data to Excel 97 without
having to setup an ODBC connection on a local machine?

.
 
Hi Ken,

Yes, you can do this with VBA. You can either do it with a built-in
database query (querytable) or via ADO. If you don't have any (or much)
programming experience (or experience with ADO), you'll probably want to go
the querytable route. The easiest way to figure out the code for that is to
start the macro recorder, select Data | Get External Data | New Database
Query. Then select new datasource, SQL Server, and go from there. When
you're done, stop the macro recorder and view the code. There is likely a
lot of extra stuff in the generated code, but it should get you started.

--
Regards,

Jake Marx
MS MVP - Excel
www.longhead.com

[please keep replies in the newsgroup - email address unmonitored]


I am merely looking for a way to get SQL data to Excel
without having each machine manually setup an ODBC
connection.

I have 150 managers that would be accessing Excel reports
on their machines. I am hoping to have them push a button
and not have to manually create an ODBC connection on
their local machine. So if Excel can setup the connection
using VBA, this would be ideal. It only has to be read-
only.



-----Original Message-----
Hi Ken,

Are you asking if it's possible to do this without setting up a DSN
on the client machine? Or are you asking if it's possible to do
without using ODBC at all?

--
Regards,

Jake Marx
MS MVP - Excel
www.longhead.com

[please keep replies in the newsgroup - email address unmonitored]


Ken said:
Is there a way of getting SQL data to Excel 97 without
having to setup an ODBC connection on a local machine?

.
 
Worked perfect! Thanks for your help.
-----Original Message-----
Hi Ken,

Yes, you can do this with VBA. You can either do it with a built-in
database query (querytable) or via ADO. If you don't have any (or much)
programming experience (or experience with ADO), you'll probably want to go
the querytable route. The easiest way to figure out the code for that is to
start the macro recorder, select Data | Get External Data | New Database
Query. Then select new datasource, SQL Server, and go from there. When
you're done, stop the macro recorder and view the code. There is likely a
lot of extra stuff in the generated code, but it should get you started.

--
Regards,

Jake Marx
MS MVP - Excel
www.longhead.com

[please keep replies in the newsgroup - email address unmonitored]


I am merely looking for a way to get SQL data to Excel
without having each machine manually setup an ODBC
connection.

I have 150 managers that would be accessing Excel reports
on their machines. I am hoping to have them push a button
and not have to manually create an ODBC connection on
their local machine. So if Excel can setup the connection
using VBA, this would be ideal. It only has to be read-
only.



-----Original Message-----
Hi Ken,

Are you asking if it's possible to do this without setting up a DSN
on the client machine? Or are you asking if it's possible to do
without using ODBC at all?

--
Regards,

Jake Marx
MS MVP - Excel
www.longhead.com

[please keep replies in the newsgroup - email address unmonitored]


Ken Valenti wrote:
Is there a way of getting SQL data to Excel 97 without
having to setup an ODBC connection on a local machine?

.

.
 
Back
Top