Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Connect Excel sheet to Database

Status
Not open for further replies.

barnard89

MIS
Mar 6, 2005
74
US
Hi

Could some one please suggest me a way how to connect an Excel sheet to SQL Server database
I wish to fetch the rows from Employee table into excel sheet
I need to connect to Employee table in "Pubs" database.
user id "sa"
password ""

I would like to connect using the concept of ADO.
Can I do a DSN less connection
Could some one please provide me the code
 
Why not simply use a QueryTable ?
when in Excel menu Data -> External data -> ...

Hope This Helps, PH.
Want to get great answers to your Tek-Tips questions? Have a look at FAQ219-2884 or FAQ181-2886
 


You can do it quite simply if you have an ODBC Driver configured for your SQL Server database with a DSN less connection using MS Query via Data/get External Data/New Database Query - SQL Databased.....

No VB code required.

Skip,
[sub]
[glasses] [red]Be Advised![/red] A man's home is his castle...
in a Manor of speaking. [tongue][/sub]
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top