none
check if data is in excel RRS feed

  • Question

  • In excel there is sheet LoadInfo with info what data are loaded in the sheets :

    sheet date

    sheet1 201905

    sheet2 201905

    sheet3 201905

    I would like to check if all the sheets has correct date (201905) in load_info sheet and if yes, load it.

    Sure, I can load LoadInfo  into db and make simple sql, but is there a way to use execute sql task and load excel data in SSIS with range 

    SELECT sheet, loaddate
    from [loadinfo$A1:B:10]

    and check this data in SSIS and make decision with constrain option?

    Thanks.


    Friday, May 17, 2019 9:45 AM

All replies

  • Hi ALdo1982, 

    but is there a way to use execute sql task and load excel data in SSIS with range 

    Yes, you can use Excel Connection Manager in Execute SQL Task. 

    Use Execute SQL Task to load the data into an Object variable(vResultSet), and use Foreach Loop to iterate the data from vResultSet row by row. 

    Please see:

    Working with “Foreach Loop container” with “Execute SQL Task”


    MSDN Community Support Please remember to click "Mark as Answer" the responses that resolved your issue, and to click "Unmark as Answer" if not. This can be beneficial to other community members reading this thread. If you have any compliments or complaints to MSDN Support, feel free to contact MSDNFSF@microsoft.com

    Friday, May 17, 2019 10:25 AM