dbTalk Databases Forums  

Export EXCEL via DTS: how to choose in which cells write the data?

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


Discuss Export EXCEL via DTS: how to choose in which cells write the data? in the microsoft.public.sqlserver.dts forum.



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

Default Export EXCEL via DTS: how to choose in which cells write the data? - 05-12-2004 , 08:33 AM






Hello!

I'm totally newbie in DTS, I have read a lot of questions similar to
mine (and their answers) but I'm not able to apply them in my own
need. :-(

I have a database and a template Excel.
I would like to :
- create a new file Excel from the template, which name would depend
of the date of the creation, and the DTS package which created it.
- In function of the date of creation, a new folder will be created
and the file will be save in it. (I want all files created on the
01/01/2004 be saved on the folder 01/01/2004, all files created on the
02/01/2004 be saved on the folder 02/01/2004 ...)
- export datas from my bd to this Excel file, but I want to be able to
indicate in my package where (in which cell of the file) I want the
data to be written.

At the moment, I am able to export data to excel but I just can
indicate the row I want them to be written.

Please don't forget that, first of all, I do know DTS just for 2days,
and that I'm french so I have some problems with english! :-)

Thanks a lot !

Al

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

Default Re: Export EXCEL via DTS: how to choose in which cells write the data? - 05-12-2004 , 09:08 AM






To be able to write to Excel it uses what are known as Named Ranges. To
create a Name range in a row and column of your choice I believe will
involve using the Excel Object model itself.



--
--

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


"Al" <alhoffmann (AT) free (DOT) fr> wrote

Quote:
Hello!

I'm totally newbie in DTS, I have read a lot of questions similar to
mine (and their answers) but I'm not able to apply them in my own
need. :-(

I have a database and a template Excel.
I would like to :
- create a new file Excel from the template, which name would depend
of the date of the creation, and the DTS package which created it.
- In function of the date of creation, a new folder will be created
and the file will be save in it. (I want all files created on the
01/01/2004 be saved on the folder 01/01/2004, all files created on the
02/01/2004 be saved on the folder 02/01/2004 ...)
- export datas from my bd to this Excel file, but I want to be able to
indicate in my package where (in which cell of the file) I want the
data to be written.

At the moment, I am able to export data to excel but I just can
indicate the row I want them to be written.

Please don't forget that, first of all, I do know DTS just for 2days,
and that I'm french so I have some problems with english! :-)

Thanks a lot !

Al



Reply With Quote
  #3  
Old   
Al
 
Posts: n/a

Default Re: Export EXCEL via DTS: how to choose in which cells write the data? - 05-13-2004 , 03:53 AM



Hello!

I'm sorry but could you give me more details, please?
I've never used Excel Object model, and after a few search I have
questions: do you mean I have to use Excel Object model through an
ActiveX script ?
I've found how to name each cells via Name range, but I still don't
know how to use it in DTS ?

Tell me if I'm wrong (and why, please :-) ), but I think that:
- I have to create an ActiveX task between my database and my Excel
file
- this ActiveX script will use the Name ranges of the excel file to
indicate where to writte the data.

Please help!!! ;-)
I really don't know all theses things (dts, excel object model,
activeX...)

Thanks for your answer and your help! :-)

Al

"Allan Mitchell" <allan (AT) no-spam (DOT) sqldts.com> wrote

Quote:
To be able to write to Excel it uses what are known as Named Ranges. To
create a Name range in a row and column of your choice I believe will
involve using the Excel Object model itself.


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

Default Re: Export EXCEL via DTS: how to choose in which cells write the data? - 05-13-2004 , 04:46 AM



A DataPump task sees a named range as a table
You will need to use the Excel Object Model inside an ActiveScript task yes

It may be better though to write the whole thing in VB or your favourite
language as although DTS will do it for you

1. It might be fiddly
2. DTS only has VBScript which is less intuitive than VB (intellisense)
3. Server side Office automation unattended is not supported by MS
4. Whilst DTS will do it I do not se DTS being a tool to make things
"Pretty" like in this situation.


--

----------------------------

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


"Al" <alhoffmann (AT) free (DOT) fr> wrote

Quote:
Hello!

I'm sorry but could you give me more details, please?
I've never used Excel Object model, and after a few search I have
questions: do you mean I have to use Excel Object model through an
ActiveX script ?
I've found how to name each cells via Name range, but I still don't
know how to use it in DTS ?

Tell me if I'm wrong (and why, please :-) ), but I think that:
- I have to create an ActiveX task between my database and my Excel
file
- this ActiveX script will use the Name ranges of the excel file to
indicate where to writte the data.

Please help!!! ;-)
I really don't know all theses things (dts, excel object model,
activeX...)

Thanks for your answer and your help! :-)

Al

"Allan Mitchell" <allan (AT) no-spam (DOT) sqldts.com> wrote

To be able to write to Excel it uses what are known as Named Ranges. To
create a Name range in a row and column of your choice I believe will
involve using the Excel Object model itself.




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.