Link to home
Start Free TrialLog in
Avatar of dcass
dcassFlag for United States of America

asked on

SQL2005 - export to Excel

How do you export an SQL 2005 table to an Excel spreadsheet?  It was easy in 2003 but can't figure it out with 2005.  For that matter, I need to be able to import, as well.
Avatar of macentrap
macentrap
Flag of Australia image

Use Import Export Wizard or a DTS package,
DTS has been renamed as SQL Server Integration Services (SSIS) in SQL 2005
Avatar of ursangel
ursangel

SSIS is teh newer version of DTS in SQL 2005.
You need to create  project in VS 2.0 of type Integration services.
In the dataflow page, add two components one for Source of type OLEDB Source and other destination whihc is your Xcel destination.
Double click the componenets and set thier properties like the data source, table name etc.
save the project and run it...

hope this will help you move ahead.
Avatar of dcass

ASKER

So there is no tab for import/export in SQL 2005.  I have to install Visual Studio 2.0?
Avatar of dcass

ASKER

can I not just set up a query - select var1, var2 from datatable and then have some way to tell it to export to an Excel file and click Execute?
if you wont to export values from the table then you can do that in excel.
for this you have to setup ODBC connection  betweeen your system and SQL server,
Open excel and call the table from there

In Excel 2007
 Data\from other sources\from SQL server
Connect to Database Server\{enter Servername}\{windows authentication}
Select the database
connect to specific table {NEXT}
Finish

Which version of Excel you using, Hope this helps {as excel 2003 } is similar too
Avatar of dcass

ASKER

I have excel 2003 - will try.
ASKER CERTIFIED SOLUTION
Avatar of macentrap
macentrap
Flag of Australia image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
I think if you dont have sqlserver 2005 better go with importing from excel option.
macentrap have suggested the steps for the same.
This seems rather an 'import to excel' solution rather than an 'export to excel' solution.  The effect is the same but the tools one works with are different.  This throws a search for working with MS SQL tools off.