dbTalk Databases Forums  

Excel File

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


Discuss Excel File in the microsoft.public.sqlserver.dts forum.



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

Default Excel File - 05-08-2006 , 02:23 PM






I want to create a DTS package where I run a query and place the oput of the
query into an excel file and the location of the file varies each month. If
I create a DTS Package where I drag an Excel Connection object into my DTS
package, I am required to define where the Excel file is and it almost seems
that I have to have a sheet already defined which can capture the results of
my query (it requires the column names for mapping the input to the output).

I wrote some VB script to change the file location each month, and that
seems to work just fine. I also create an empty "template" of each of the
Excel files that I want to create each month, which just has the headings. I
place these "template" excel files in a special folder. Now I want to find a
way to "create" a directory in a shared drive if does not exists, and then
copy all of the template excel files into that directory which was created
(or it might have already existed).

How do I create the directory?
How do I copy the Template Excel Files into the create directory?

Thanks in advance for your assistance!!!

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.