dbTalk Databases Forums  

Import Question

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


Discuss Import Question in the microsoft.public.sqlserver.dts forum.



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

Default Import Question - 08-04-2005 , 10:11 AM






I am tring to import multiple xls files into a sql table. I have am able to
get the file names using a file system object, but what i would like to do,
is once i have the file name, change the name of the excel connection object
to that name and then perform the data transformation. once this is done,
repeat with the next file name until complete.

can someone please help me with this task?

thanks
Ben

Reply With Quote
  #2  
Old   
David Portas
 
Posts: n/a

Default Re: Import Question - 08-04-2005 , 11:12 AM






http://www.sqldts.com/default.aspx?246

--
David Portas
SQL Server MVP
--


Reply With Quote
  #3  
Old   
Peter A. Schott
 
Posts: n/a

Default Re: Import Question - 08-04-2005 , 03:06 PM



Easiest method if you're on 2000 - assign XLS name to a global variable. Use
Dynamic properties task to assign that name to the connection.

You should be able to read the filenames from the table into a Recordset
Global Variable and loop through that with some activex code to get the
values.

Check out www.sqldts.com for the samples on looping to get some more details.

-Pete

Ben <ben_1_ AT hotmail DOT com> wrote:

Quote:
I am tring to import multiple xls files into a sql table. I have am able to
get the file names using a file system object, but what i would like to do,
is once i have the file name, change the name of the excel connection object
to that name and then perform the data transformation. once this is done,
repeat with the next file name until complete.

can someone please help me with this task?

thanks
Ben


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.