dbTalk Databases Forums  

multiple excel file import

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


Discuss multiple excel file import in the microsoft.public.sqlserver.dts forum.



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

Default multiple excel file import - 08-05-2004 , 01:15 PM






i'm designing a dts that imports data to sql from hundreds of different
excel files, is there a way to automate the process of creating each excel
connection & data task.

please advise.

Reply With Quote
  #2  
Old   
Darren Green
 
Posts: n/a

Default Re: multiple excel file import - 08-06-2004 , 01:50 AM






If the files are all the same structure, just a different filter of the
source data for example, then use on task and a loop in the package.

Some loop examples-

How to loop through a global variable Rowset
(http://www.sqldts.com/default.aspx?298)

How to export all tables in a database
(http://www.sqldts.com/default.aspx?299)

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

How can I change the filename for an Access Connection? (Same for Excel
Conn)
(http://www.sqldts.com/default.aspx?201)


--
Darren Green
http://www.sqldts.com

"bt" <bt (AT) discussions (DOT) microsoft.com> wrote

Quote:
i'm designing a dts that imports data to sql from hundreds of different
excel files, is there a way to automate the process of creating each excel
connection & data task.

please advise.



Reply With Quote
  #3  
Old   
Michael Vardinghus
 
Posts: n/a

Default Re: multiple excel file import - 08-12-2004 , 08:40 AM



Hi Darren

Great examples - however I cannot get the looping, importing one to work.
Changed the global parameteres to directories on my machine and put a text
file here but when executing it says the directories are bad ?

--Michael V.

"Darren Green" <darren.green (AT) reply-to-newsgroup-sqldts (DOT) com> skrev i en
meddelelse news:%23ewRjH4eEHA.1764 (AT) TK2MSFTNGP10 (DOT) phx.gbl...
Quote:
If the files are all the same structure, just a different filter of the
source data for example, then use on task and a loop in the package.

Some loop examples-

How to loop through a global variable Rowset
(http://www.sqldts.com/default.aspx?298)

How to export all tables in a database
(http://www.sqldts.com/default.aspx?299)

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

How can I change the filename for an Access Connection? (Same for Excel
Conn)
(http://www.sqldts.com/default.aspx?201)


--
Darren Green
http://www.sqldts.com

"bt" <bt (AT) discussions (DOT) microsoft.com> wrote in message
news:B5B1946D-9036-4768-86AE-F95FDA5DA047 (AT) microsoft (DOT) com...
i'm designing a dts that imports data to sql from hundreds of different
excel files, is there a way to automate the process of creating each
excel
connection & data task.

please advise.





Reply With Quote
  #4  
Old   
Darren Green
 
Posts: n/a

Default Re: multiple excel file import - 08-12-2004 , 02:29 PM



Check the folders then, are they correct for the machine where the
package is executing. Sounds like they are not. Remember DTS packages
execute locally, they are not client/server based like the rest of SQL
Server.

Darren

In message <ujnR1EHgEHA.644 (AT) tk2msftngp13 (DOT) phx.gbl>, Michael Vardinghus
<michaelvardinghus (AT) notexisting (DOT) com> writes
Quote:
Hi Darren

Great examples - however I cannot get the looping, importing one to work.
Changed the global parameteres to directories on my machine and put a text
file here but when executing it says the directories are bad ?

--Michael V.

"Darren Green" <darren.green (AT) reply-to-newsgroup-sqldts (DOT) com> skrev i en
meddelelse news:%23ewRjH4eEHA.1764 (AT) TK2MSFTNGP10 (DOT) phx.gbl...
If the files are all the same structure, just a different filter of the
source data for example, then use on task and a loop in the package.

Some loop examples-

How to loop through a global variable Rowset
(http://www.sqldts.com/default.aspx?298)

How to export all tables in a database
(http://www.sqldts.com/default.aspx?299)

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

How can I change the filename for an Access Connection? (Same for Excel
Conn)
(http://www.sqldts.com/default.aspx?201)


--
Darren Green
http://www.sqldts.com

"bt" <bt (AT) discussions (DOT) microsoft.com> wrote in message
news:B5B1946D-9036-4768-86AE-F95FDA5DA047 (AT) microsoft (DOT) com...
i'm designing a dts that imports data to sql from hundreds of different
excel files, is there a way to automate the process of creating each
excel
connection & data task.

please advise.




--
Darren Green (SQL Server MVP)
DTS - http://www.sqldts.com

PASS - the definitive, global community for SQL Server professionals
http://www.sqlpass.org



Reply With Quote
  #5  
Old   
Michael Vardinghus
 
Posts: n/a

Default Re: multiple excel file import - 08-14-2004 , 11:54 AM



Don't know what I'm doing wrong - after this post I checked the folders
again. In global parameters I set the folder to c:\temp - then tried
c:\temp\ - then tried c:\ - it keeps on saying bad source and archive
directory.

Running SQL Server 2000 on a laptop (off domain) - can it be something
regarding my userrights - i believe my user is an admin user ?

--Michael V.


"Darren Green" <darren.green (AT) reply-to-newsgroup-sqldts (DOT) com> skrev i en
meddelelse news:rw$u7EamU8GBFwJf (AT) sqldts (DOT) com...
Quote:
Check the folders then, are they correct for the machine where the
package is executing. Sounds like they are not. Remember DTS packages
execute locally, they are not client/server based like the rest of SQL
Server.

Darren

In message <ujnR1EHgEHA.644 (AT) tk2msftngp13 (DOT) phx.gbl>, Michael Vardinghus
michaelvardinghus (AT) notexisting (DOT) com> writes
Hi Darren

Great examples - however I cannot get the looping, importing one to work.
Changed the global parameteres to directories on my machine and put a
text
file here but when executing it says the directories are bad ?

--Michael V.

"Darren Green" <darren.green (AT) reply-to-newsgroup-sqldts (DOT) com> skrev i en
meddelelse news:%23ewRjH4eEHA.1764 (AT) TK2MSFTNGP10 (DOT) phx.gbl...
If the files are all the same structure, just a different filter of the
source data for example, then use on task and a loop in the package.

Some loop examples-

How to loop through a global variable Rowset
(http://www.sqldts.com/default.aspx?298)

How to export all tables in a database
(http://www.sqldts.com/default.aspx?299)

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

How can I change the filename for an Access Connection? (Same for Excel
Conn)
(http://www.sqldts.com/default.aspx?201)


--
Darren Green
http://www.sqldts.com

"bt" <bt (AT) discussions (DOT) microsoft.com> wrote in message
news:B5B1946D-9036-4768-86AE-F95FDA5DA047 (AT) microsoft (DOT) com...
i'm designing a dts that imports data to sql from hundreds of
different
excel files, is there a way to automate the process of creating each
excel
connection & data task.

please advise.





--
Darren Green (SQL Server MVP)
DTS - http://www.sqldts.com

PASS - the definitive, global community for SQL Server professionals
http://www.sqlpass.org




Reply With Quote
  #6  
Old   
Michael Vardinghus
 
Posts: n/a

Default Re: multiple excel file import - 08-14-2004 , 12:09 PM



Sorry bout that darren - i put in a message box to see what the expression
fso.FolderExists(DTSGlobalVariables("gv_FileLocati on").Value) returned. And
it returned "Sand" - which is danish for true....

So I just have to adjust True to Sand.

My mistake - thanks again.




"Darren Green" <darren.green (AT) reply-to-newsgroup-sqldts (DOT) com> skrev i en
meddelelse news:rw$u7EamU8GBFwJf (AT) sqldts (DOT) com...
Quote:
Check the folders then, are they correct for the machine where the
package is executing. Sounds like they are not. Remember DTS packages
execute locally, they are not client/server based like the rest of SQL
Server.

Darren

In message <ujnR1EHgEHA.644 (AT) tk2msftngp13 (DOT) phx.gbl>, Michael Vardinghus
michaelvardinghus (AT) notexisting (DOT) com> writes
Hi Darren

Great examples - however I cannot get the looping, importing one to work.
Changed the global parameteres to directories on my machine and put a
text
file here but when executing it says the directories are bad ?

--Michael V.

"Darren Green" <darren.green (AT) reply-to-newsgroup-sqldts (DOT) com> skrev i en
meddelelse news:%23ewRjH4eEHA.1764 (AT) TK2MSFTNGP10 (DOT) phx.gbl...
If the files are all the same structure, just a different filter of the
source data for example, then use on task and a loop in the package.

Some loop examples-

How to loop through a global variable Rowset
(http://www.sqldts.com/default.aspx?298)

How to export all tables in a database
(http://www.sqldts.com/default.aspx?299)

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

How can I change the filename for an Access Connection? (Same for Excel
Conn)
(http://www.sqldts.com/default.aspx?201)


--
Darren Green
http://www.sqldts.com

"bt" <bt (AT) discussions (DOT) microsoft.com> wrote in message
news:B5B1946D-9036-4768-86AE-F95FDA5DA047 (AT) microsoft (DOT) com...
i'm designing a dts that imports data to sql from hundreds of
different
excel files, is there a way to automate the process of creating each
excel
connection & data task.

please advise.





--
Darren Green (SQL Server MVP)
DTS - http://www.sqldts.com

PASS - the definitive, global community for SQL Server professionals
http://www.sqlpass.org




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.