Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 SQL Server 2000 Forums
 Import/Export (DTS) and Replication (2000)
 Link Excel Spreadsheet or import xls file

Author  Topic 

AskSQLTeam
Ask SQLTeam Question

0 Posts

Posted - 2004-03-01 : 07:49:26
William writes "How in MS Query Analyzer do you write sql scrpt to import a .xls file using the query analyzer. I have a spreadsheet and I need to run query analyzer and I need to import the .xls file. Do you use the link in order to do it."

safigi
Starting Member

15 Posts

Posted - 2004-03-01 : 08:38:19
Hi William.
I think this is a simplier solution for you.

SELECT *
FROM OpenDataSource( 'Microsoft.Jet.OLEDB.4.0',
'Data Source="yourfiles.xls";User ID=Admin;Password=;Extended properties=Excel 5.0')...YourSheetName$

Safi
Go to Top of Page
   

- Advertisement -