Excel sheets to Sql server

  • i m having three excel files and each file contains 4 sheets of different month names which contains some data of that particular month. I want to load the current month data contained in different files into one table in SQL Server. How can i do it with the help of SSIS. Would you

    please tell the solution. Thanks in Advance.

    Thanks,

    Satendra Singh

  • I don't see the link with certification, but anyway...

    You first need to find which sheet you need to load from.

    I think the easiest option is to find that sheet using a script task where you check the name against the current month.

    Store the sheet name in a SSIS variable and construct a SQL query in another string variable. Use this variable as the source for the SQL Statement in your Excel source.

    Need an answer? No, you need a question
    My blog at https://sqlkover.com.
    MCSE Business Intelligence - Microsoft Data Platform MVP

  • Thanks a lot Koen...actually m having three excel files excel1,excel2,excel3.

    In Excel1 file there are three sheets:-

    April May June

    tuhin Rajesh Prince

    kamal Mohit kashish

    another excel files also contains the similar kinds of sheets and the corresponding data. I want to load the Current Month(June) data into the SQL Server database. I dont know what script i need to write in the script task. If it is possible then please tell me the steps by steps solution to rectify this problem. Actually i m new to ssis and facing this kind of issues. Please guide me, m very thankful to you.

    Thanks

    Satendra Singh

  • To get you started, read the following article:

    Working with Excel Files with the Script Task

    Example 2 Description: Check Whether an Excel Table Exists is the one you need.

    Need an answer? No, you need a question
    My blog at https://sqlkover.com.
    MCSE Business Intelligence - Microsoft Data Platform MVP

  • Thanks a lot dear

Viewing 5 posts - 1 through 5 (of 5 total)

You must be logged in to reply to this topic. Login to reply