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 |
leslieb
Starting Member
23 Posts |
Posted - 2009-02-12 : 18:08:09
|
I upload a new Excel spreadsheet each day using SSIS. The data comes from a different system and it has a file name of the date ie 20090212. The Sheet name is the same (only 1 sheet). I save the file as a standard file name. Is there a place in SSIS where I can tell the system to accept any sheet name by using a wildcard, etc? |
|
sodeep
Master Smack Fu Yak Hacker
7174 Posts |
Posted - 2009-02-12 : 18:18:00
|
quote: Originally posted by leslieb I upload a new Excel spreadsheet each day using SSIS. The data comes from a different system and it has a file name of the date ie 20090212. The Sheet name is the same (only 1 sheet). I save the file as a standard file name. Is there a place in SSIS where I can tell the system to accept any sheet name by using a wildcard, etc?
Yes you can with FOREACH LOOP CONTAINER.You can specify any files with extension in that directory? |
 |
|
visakh16
Very Important crosS Applying yaK Herder
52326 Posts |
Posted - 2009-02-13 : 09:59:21
|
quote: Originally posted by leslieb I upload a new Excel spreadsheet each day using SSIS. The data comes from a different system and it has a file name of the date ie 20090212. The Sheet name is the same (only 1 sheet). I save the file as a standard file name. Is there a place in SSIS where I can tell the system to accept any sheet name by using a wildcard, etc?
if sheet name always have current of previous date name, you could simply declare a variable to get this date value using expression builder , then map this variable to filename property of file source.http://blogs.conchango.com/jamiethomson/archive/2005/03/19/SSIS_3A00_-Evaluating-variables-as-expressions.aspx |
 |
|
leslieb
Starting Member
23 Posts |
Posted - 2009-02-15 : 16:19:49
|
visakh16Thanks for the info but the filename is not always the previous day as it is only run Monday to friday and not on public holidays.So I would receive the file on Monday but it would be dated the Friday.Thanks for your time. |
 |
|
visakh16
Very Important crosS Applying yaK Herder
52326 Posts |
Posted - 2009-02-15 : 21:34:14
|
ok..then how will you decide whats the date to be associated to filename? |
 |
|
jmill130
Starting Member
26 Posts |
Posted - 2009-02-16 : 09:51:13
|
maybe have it based on the day of the week, mondays it will be today -3, assume if you are including holidays need more logic to handles these days. |
 |
|
visakh16
Very Important crosS Applying yaK Herder
52326 Posts |
Posted - 2009-02-16 : 09:54:15
|
then based on your rule, write an expression to get date value using expression builder. then use steps outlined below to join it with file name |
 |
|
leslieb
Starting Member
23 Posts |
Posted - 2009-02-16 : 16:56:35
|
visakh16Thanks for the suggestion but you did not put in the 'steps outline below'. Thanking you in anticipation of posting them. |
 |
|
|
|
|