July 11, 2012 at 12:08 pm
I have to create a SSIS package.
Where the data gets loaded from excel to Sql server database table....
excel file name gets updated every 1 hour...so after every 1 hour new excel file with a different name is created....
So please someone help with the steps required to load data from excel to sql server table and where excel file and name gets updated every one hour...
July 11, 2012 at 1:08 pm
Sounds like a foreach task containing a fairly simple dataflow to me. The Foreach task will enumerate over your import folder, looking for *.xslx (or similar) and passing the name of the Excel file to your data flow task via a package variable.
Followed by a File System Task to archive the file, once processing is completed.
The absence of evidence is not evidence of absence
- Martin Rees
The absence of consumable DDL, sample data and desired results is, however, evidence of the absence of my response
- Phil Parkin
July 11, 2012 at 1:18 pm
Lucky9 (7/11/2012)
I have to create a SSIS package.Where the data gets loaded from excel to Sql server database table....
excel file name gets updated every 1 hour...so after every 1 hour new excel file with a different name is created....
So please someone help with the steps required to load data from excel to sql server table and where excel file and name gets updated every one hour...
There is a good article here: http://blog.sqlauthority.com/2011/05/12/sql-server-import-csv-file-into-database-table-using-ssis/ that explains how to do it. The author uses .csv files but it's easy enough to use Excel instead.
July 11, 2012 at 1:26 pm
Yes, but the Foreach loop (or some other technique) will still be required to take care of the varying file name ...
The absence of evidence is not evidence of absence
- Martin Rees
The absence of consumable DDL, sample data and desired results is, however, evidence of the absence of my response
- Phil Parkin
Viewing 4 posts - 1 through 3 (of 3 total)
You must be logged in to reply to this topic. Login to reply