dbTalk Databases Forums  

Creating a file in DTS

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


Discuss Creating a file in DTS in the microsoft.public.sqlserver.dts forum.



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

Default Creating a file in DTS - 08-01-2003 , 07:49 AM






A very basic question ( I think....)

I am new to DTS. I want to create a simple .xls(excel) file with a specific
name using my DTS package

How can I do it?

Thanks.



Reply With Quote
  #2  
Old   
JFB
 
Posts: n/a

Default Re: Creating a file in DTS - 08-01-2003 , 04:44 PM






Hi JK,
Use activex script task for this.
Here is a great example for txt file but should the same for xls file.
http://www.sqldts.com/default.aspx?6,101,200,0,0
JFB

"JK" <jeetrana (AT) hotmail (DOT) com> wrote

Quote:
A very basic question ( I think....)

I am new to DTS. I want to create a simple .xls(excel) file with a
specific
name using my DTS package

How can I do it?

Thanks.





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

Default Re: Creating a file in DTS - 08-03-2003 , 02:17 PM



Not quite true.

Try creating a Datapump task between a SQL Server and an Excel Spreadsheet. OK ? test,Works ? Good. Now go to disconnected edit and manually change the filename of the excel file. DTS will choke with an unrecognised destination object name.

You need to make sure you create the destination object on the XL Spreadsheet i.e.

CREATE TABLE `authors2` (
`au_id` VarChar (11) ,
`au_lname` VarChar (40) ,
`au_fname` VarChar (20) ,
`phone` VarChar (12) ,
`address` VarChar (40) ,
`city` VarChar (20) ,
`state` VarChar (2) ,
`zip` VarChar (5) ,
`contract` Bit )

I put this in an ExecuteSQL Task before the datapump task.


--

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

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.