dbTalk Databases Forums  

DTS for Import Export TO And From EXCEL

microsoft.public.sqlserver.dts microsoft.public.sqlserver.dts


Discuss DTS for Import Export TO And From EXCEL in the microsoft.public.sqlserver.dts forum.



Reply
 
Thread Tools Display Modes
  #1  
Old   
Prabhat
 
Posts: n/a

Default DTS for Import Export TO And From EXCEL - 05-19-2005 , 08:12 AM






Hi All,

I want to design a DTS Package that will read an EXCEL Document (One Data
Source) and ONE SQL Server (2nd Data Source) and Execute one Query which
will have a JOIN from Both the source and Export the result to another Excel
Document.

How Can I perform that using DTS?

I have took 3 Connections 1) SQL Server 2) Excel -> These tow for Source
And 3) Excel Connection for Export the Result.

My Requirement is to get the value from One of the column from one of the
Sheet and use that values to get a Joined Record from TWO tables of SQL
Server.

Ex: -

Sheet2$ : Having Column "EmployeeID" with 100 rows.

IN SQL Server I have 2 Tables. 1) Employee 2) Dept.

I want to export the LIST of the Departments for the Employee that are in
the Excel Sheet2.

Please Suggest how can I do that or any Better solution using DTS.


Thanks
Prabhat



Reply With Quote
  #2  
Old   
Allan Mitchell
 
Posts: n/a

Default Re: DTS for Import Export TO And From EXCEL - 05-19-2005 , 01:58 PM






You could use OPENDATASOURCE

SELECT *
FROM OpenDataSource( 'Microsoft.Jet.OLEDB.4.0',
'Data Source="c:\Finance\account.xls";User ID=Admin;Password=;Extended
properties=Excel 5.0')...xactions


Or you can create a linked server of the source XL spreadsheet from the
SQL Server. You then query that and export to XL destination.

You cannot use the Excel connections to do this ..........Yet.

Allan

"Prabhat" <not_a_mail (AT) hotmail (DOT) com> wrote


Quote:
Hi All,

I want to design a DTS Package that will read an EXCEL Document (One Data
Source) and ONE SQL Server (2nd Data Source) and Execute one Query which
will have a JOIN from Both the source and Export the result to another Excel
Document.

How Can I perform that using DTS?

I have took 3 Connections 1) SQL Server 2) Excel -> These tow for Source
And 3) Excel Connection for Export the Result.

My Requirement is to get the value from One of the column from one of the
Sheet and use that values to get a Joined Record from TWO tables of SQL
Server.

Ex: -

Sheet2$ : Having Column "EmployeeID" with 100 rows.

IN SQL Server I have 2 Tables. 1) Employee 2) Dept.

I want to export the LIST of the Departments for the Employee that are in
the Excel Sheet2.

Please Suggest how can I do that or any Better solution using DTS.


Thanks
Prabhat


Reply With Quote
  #3  
Old   
Douglas Laudenschlager [MS]
 
Posts: n/a

Default Re: DTS for Import Export TO And From EXCEL - 05-23-2005 , 06:37 PM



306397 How To Use Excel with SQL Server Linked Servers and Distributed
Queries
http://support.microsoft.com/?id=306397

-Doug
--
Douglas Laudenschlager
Microsoft SQL Server documentation team
Redmond, Washington, USA

This posting is provided "AS IS" with no warranties, and confers no rights.

"Prabhat" <not_a_mail (AT) hotmail (DOT) com> wrote

Quote:
Hi All,

I want to design a DTS Package that will read an EXCEL Document (One Data
Source) and ONE SQL Server (2nd Data Source) and Execute one Query which
will have a JOIN from Both the source and Export the result to another
Excel
Document.

How Can I perform that using DTS?

I have took 3 Connections 1) SQL Server 2) Excel -> These tow for Source
And 3) Excel Connection for Export the Result.

My Requirement is to get the value from One of the column from one of the
Sheet and use that values to get a Joined Record from TWO tables of SQL
Server.

Ex: -

Sheet2$ : Having Column "EmployeeID" with 100 rows.

IN SQL Server I have 2 Tables. 1) Employee 2) Dept.

I want to export the LIST of the Departments for the Employee that are in
the Excel Sheet2.

Please Suggest how can I do that or any Better solution using DTS.


Thanks
Prabhat





Reply With Quote
  #4  
Old   
Prabhat
 
Posts: n/a

Default Re: DTS for Import Export TO And From EXCEL - 06-06-2005 , 11:21 AM




"Douglas Laudenschlager [MS]" <douglasl (AT) online (DOT) microsoft.com> wrote in
message news:OOnZmB$XFHA.2884 (AT) tk2msftngp13 (DOT) phx.gbl...
Quote:
306397 How To Use Excel with SQL Server Linked Servers and Distributed
Queries
http://support.microsoft.com/?id=306397

-Doug
--
Douglas Laudenschlager
Microsoft SQL Server documentation team
Redmond, Washington, USA

This posting is provided "AS IS" with no warranties, and confers no
rights.

"Prabhat" <not_a_mail (AT) hotmail (DOT) com> wrote in message
news:%23iSD4RHXFHA.3464 (AT) TK2MSFTNGP10 (DOT) phx.gbl...
Hi All,

I want to design a DTS Package that will read an EXCEL Document (One
Data
Source) and ONE SQL Server (2nd Data Source) and Execute one Query which
will have a JOIN from Both the source and Export the result to another
Excel
Document.

How Can I perform that using DTS?

I have took 3 Connections 1) SQL Server 2) Excel -> These tow for Source
And 3) Excel Connection for Export the Result.

My Requirement is to get the value from One of the column from one of
the
Sheet and use that values to get a Joined Record from TWO tables of SQL
Server.

Ex: -

Sheet2$ : Having Column "EmployeeID" with 100 rows.

IN SQL Server I have 2 Tables. 1) Employee 2) Dept.

I want to export the LIST of the Departments for the Employee that are
in
the Excel Sheet2.

Please Suggest how can I do that or any Better solution using DTS.


Thanks
Prabhat







Reply With Quote
Reply




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Powered by vBulletin Version 3.5.3
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.