Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

How to import any excel file dropped in a folder

Status
Not open for further replies.

nickspace

IS-IT--Management
May 2, 2005
43
0
0
US
Hi everyone, I'm new to DTS. I've gone through a lot of posts in this forum but so far I have not found any post that informs about importing any excel file (any random name) to a SQL table. In my case, the column names in the excel file are consistent, but the actual file name could be anything. Also the file could be copied to that folder any time of the day and it would be great if someone could help me write a script to trigger the DTS import within 15 minutes of the file getting created.

Would greatly appreciate any help.
Thanks,
Nick
 
You can use a dynamic properties task to change the file name that you are importing. You can use T/SQL to get the list of files that are in the folder. Then set the file name to the first in the list and then do the transformation. Continue doing this until you are out of files.

You'd have to schedule the job to run every 15 minutes to make it happen within 15 minutes of a file showing up.

Denny
MCSA (2003) / MCDBA (SQL 2000) / MCTS (SQL 2005) / MCITP Database Administrator (SQL 2005)

--Anything is possible. All it takes is a little research. (Me)
[noevil]
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top