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.
Author |
Topic |
nitin1353
Constraint Violating Yak Guru
381 Posts |
Posted - 2006-06-08 : 17:34:17
|
GurusI 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 adviceRegards |
|
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 Kizeraka tduggan |
 |
|
nitin1353
Constraint Violating Yak Guru
381 Posts |
Posted - 2006-06-08 : 17:51:46
|
TaraSorry 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?REgardsNitin |
 |
|
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.htmlTara Kizeraka tduggan |
 |
|
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.ThanksI will revert back for more questionsRegards |
 |
|
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 |
 |
|
madhivanan
Premature Yak Congratulator
22864 Posts |
|
|
|
|