dbTalk Databases Forums  

How To Read the Contents of a Directory

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


Discuss How To Read the Contents of a Directory in the microsoft.public.sqlserver.dts forum.



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

Default How To Read the Contents of a Directory - 08-02-2005 , 03:07 PM






I would like to write a DTS package to import a number of Excel files
from a network directory to a single SQL Server table.
Assumptions:
I am assuming that the coulmns are constant among the Excel files and
only the file content is different.

1. Is there a function to read a predefined network directory to obtain
a list of Excel files.
2. What is the best method to import the contents of the Excel files in
to a SQL Server database table.

Any insight will be greatly appreciated.


*** Sent via Developersdex http://www.developersdex.com ***

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

Default Re: How To Read the Contents of a Directory - 08-02-2005 , 04:12 PM






You can very easily adapt this

Looping, Importing and Archiving
(http://www.sqldts.com/default.aspx?246)



--



Allan Mitchell MCSE,MCDBA, (Microsoft SQL Server MVP)
www.SQLDTS.com - The site for all your DTS needs.
www.SQLIS.com - You thought DTS was good. here we show you the new stuff.
www.konesans.com - Consultancy from the people who know


"Paul Backer" <paul_b_backer (AT) yahoo (DOT) com> wrote

Quote:
I would like to write a DTS package to import a number of Excel files
from a network directory to a single SQL Server table.
Assumptions:
I am assuming that the coulmns are constant among the Excel files and
only the file content is different.

1. Is there a function to read a predefined network directory to obtain
a list of Excel files.
2. What is the best method to import the contents of the Excel files in
to a SQL Server database table.

Any insight will be greatly appreciated.


*** Sent via Developersdex http://www.developersdex.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.