dbTalk Databases Forums  

How to rename Excel Worksheet using DTS

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


Discuss How to rename Excel Worksheet using DTS in the microsoft.public.sqlserver.dts forum.



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

Default How to rename Excel Worksheet using DTS - 06-07-2005 , 04:22 PM






Hi,

I have task to automate for loading Excel files. In this excel file every
time i get with diffrent name as well within excel every time different
worksheet name.

Good thing is format is static but I need to find out way to rename to
common name for excel file and common name for worksheet. So i can import
data into SQL server using DTS.

Goal : rename excel file, rename worksheet.

Any idea ?

Thanks
Kris

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

Default Re: How to rename Excel Worksheet using DTS - 06-08-2005 , 10:59 AM






Use Active script to rename you files. Here is an example for text file, use
the same idea for excel files.
http://www.sqldts.com/default.aspx?200
Rgds
JFB



"Kris" <Kris (AT) discussions (DOT) microsoft.com> wrote

Quote:
Hi,

I have task to automate for loading Excel files. In this excel file every
time i get with diffrent name as well within excel every time different
worksheet name.

Good thing is format is static but I need to find out way to rename to
common name for excel file and common name for worksheet. So i can import
data into SQL server using DTS.

Goal : rename excel file, rename worksheet.

Any idea ?

Thanks
Kris



Reply With Quote
  #3  
Old   
shumaker@cs.fsu.edu
 
Posts: n/a

Default Re: How to rename Excel Worksheet using DTS - 06-10-2005 , 08:52 AM



You could use the execute process task to run the rename.exe and pass
parameters. You could programmatically set global variables to
concactenate together the command line parameters and then use a
dynamic properties task to set that in the execution process task
before it runs, that is if your renaming is going to be dynamic in some
way.


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

Default Re: How to rename Excel Worksheet using DTS - 06-10-2005 , 11:31 AM



Thanks for reply.

Renaming Excel file name is no big deal, I am using FSO in Activex Script.
How ever still i don't know how to rename worksheet ...any help ..

Thanks
-Kris

"JFB" wrote:

Quote:
Use Active script to rename you files. Here is an example for text file, use
the same idea for excel files.
http://www.sqldts.com/default.aspx?200
Rgds
JFB



"Kris" <Kris (AT) discussions (DOT) microsoft.com> wrote in message
news:719B839B-5D4B-478E-B4CF-FBE2F0470E80 (AT) microsoft (DOT) com...
Hi,

I have task to automate for loading Excel files. In this excel file every
time i get with diffrent name as well within excel every time different
worksheet name.

Good thing is format is static but I need to find out way to rename to
common name for excel file and common name for worksheet. So i can import
data into SQL server using DTS.

Goal : rename excel file, rename worksheet.

Any idea ?

Thanks
Kris




Reply With Quote
  #5  
Old   
Ilin Star via SQLMonster.com
 
Posts: n/a

Default Re: How to rename Excel Worksheet using DTS - 06-27-2005 , 07:58 PM



Can you please provide information how you rename file in Excel from DTS? Do
you know how to remove all records from existing Excel file that new records
from data transformation service would not append to existing?
Thanks,
Ilin

--
Message posted via http://www.sqlmonster.com

Reply With Quote
  #6  
Old   
Kris
 
Posts: n/a

Default Re: How to rename Excel Worksheet using DTS - 06-28-2005 , 11:03 AM



its easy :

1) First to remove records ..I would prefer to drop excel file..
2) here is url ...

http://msdn.microsoft.com/library/de...bjectmodel.asp



"Ilin Star via SQLMonster.com" wrote:

Quote:
Can you please provide information how you rename file in Excel from DTS? Do
you know how to remove all records from existing Excel file that new records
from data transformation service would not append to existing?
Thanks,
Ilin

--
Message posted via http://www.sqlmonster.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.