dbTalk Databases Forums  

DTS To Create an Excel Page then paste SQL Query Result

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


Discuss DTS To Create an Excel Page then paste SQL Query Result in the microsoft.public.sqlserver.dts forum.



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

Default DTS To Create an Excel Page then paste SQL Query Result - 08-19-2003 , 10:53 PM







Hi Experts,

I am designing a DTS script which should create an Excel page then it
will run a SQL Query within it and paste the results in the Excel sheet.

I know how to create the Excel Sheet with
"CreateObject('Excel.Application") but dont know how to run the SQL
Query within this Excel Object. The query then should paste the rows and
columns in a predefined area within the excel sheet.

Any idea would really be approciated.

Thnaks.

Dip


--
Posted via http://dbforums.com

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

Default Re: DTS To Create an Excel Page then paste SQL Query Result - 08-20-2003 , 01:28 AM






If you want to add rows to the spreadsheet you are going to have to

1. Create a Table in Excel OR
2. Create a named range.




--

----------------------------
Allan Mitchell (Microsoft SQL Server MVP)
MCSE,MCDBA
www.SQLDTS.com
I support PASS - the definitive, global community
for SQL Server professionals - http://www.sqlpass.org



"Dip" <Dip (AT) Microhaus (DOT) com> wrote

Quote:
Hi Experts,

I am designing a DTS script which should create an Excel page then it
will run a SQL Query within it and paste the results in the Excel sheet.

I know how to create the Excel Sheet with
"CreateObject('Excel.Application") but dont know how to run the SQL
Query within this Excel Object. The query then should paste the rows and
columns in a predefined area within the excel sheet.

Any idea would really be approciated.

Thnaks.

Dip


--
Posted via http://dbforums.com



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.