Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 SQL Server 2000 Forums
 SQL Server Administration (2000)
 Exporting data into tables from excel file

Author  Topic 

nitin1353
Constraint Violating Yak Guru

381 Posts

Posted - 2006-06-08 : 17:34:17
Gurus
I want to export data into my tables from the excel file.this has to be done dynamically.Like if i have some excel files on my server and i want to export that data into my tables,how will i do that?Thru DTS??do i have to write a code in activex script for this?Please advice
Regards

tkizer
Almighty SQL Goddess

38200 Posts

Posted - 2006-06-08 : 17:36:20
Yes you can use DTS to import (not export as exporting would be from your tables into Excel) your data. You probably won't have to write any ActiveX code, just depends if you want to transform your data during the import process.

DTS has a wizard for this type of thing, so walk through that then save it at the end. You can then go back in and check out what it does in the DTS designer.

Tara Kizer
aka tduggan
Go to Top of Page

nitin1353
Constraint Violating Yak Guru

381 Posts

Posted - 2006-06-08 : 17:51:46
Tara
Sorry to bother you again.Can you be a bit more specific.which wizard in DTS should i use.I understand that i can done that manually by selecting source as excel sheet>but i want o schedultit so that it checks for the file and it shoud dynamically pick the file from a particular folder.
Is this possible?
REgards
Nitin
Go to Top of Page

tkizer
Almighty SQL Goddess

38200 Posts

Posted - 2006-06-08 : 17:56:45
So the file name isn't always going to be the same? If not, then I believe www.sqldts.com has some articles on how to do this in DTS.

My files weren't all named the same, so I wrote ActiveX code to rename them to what my DTS package expected. I believe sqldts.com has a better way to do this though. And no I can't share the code that I wrote. For ActiveX coding help, I use this:
http://www.devguru.com/Technologies/vbscript/quickref/vbscript_intro.html

Tara Kizer
aka tduggan
Go to Top of Page

nitin1353
Constraint Violating Yak Guru

381 Posts

Posted - 2006-06-08 : 18:09:58
Yes tara the file name will be different each time.Let me go thru the links which you have sent.and its ok i dnt need the code i expect developer to write this code in activex script.
Thanks
I will revert back for more questions
Regards
Go to Top of Page

kjmraohyd
Starting Member

34 Posts

Posted - 2006-06-09 : 04:59:47
If you run the Local Package succesful, then create a Scheduled job and define the following code in your STEP:

xp_cmdshell 'dtsrun /SServername /Usa /PPassword /NPackageName'

Jaganmohan Rao
Go to Top of Page

madhivanan
Premature Yak Congratulator

22864 Posts

Posted - 2006-06-09 : 07:09:12
Also refer
http://www.sqlteam.com/forums/topic.asp?TOPIC_ID=49926

Madhivanan

Failing to plan is Planning to fail
Go to Top of Page
   

- Advertisement -