Unable to skip an empty Excel file source

  • Is there a way to have my Control Flow in SSIS ignore a step if its referenced datasource is an empty Excel file?

  • I assume you mean by "empty" that they have literally no data in it, including headers (and as result the data flow errors)? If so, isn't the real solution to find out why there are completely empty files? If there are headers, then does it really matter?

    Thom~

    Excuse my typos and sometimes awful grammar. My fingers work faster than my brain does.
    Larnu.uk

  • Thanks! that solved the problem... I added the headers which avoided the errors

  • Yes, Use a execute SQL task to count the records Imported. Set a Flag to indicate if the count was 0.

    IF EXISTS (SELECT 1 FROM [dbo].[Table] )
    BEGIN
    SELECT 1 AS FileExistsFlag
    END
    ELSE
    BEGIN
    SELECT 0 AS FileExistsFlag
    END

    Create a variable called LoadStatusFlag

    On the result set of your task

    Untitled3

    Then click on the Data flow line out of you execute SQL Task.

    Untitled4

    • This reply was modified 3 years, 6 months ago by  wburke 85918.

Viewing 4 posts - 1 through 3 (of 3 total)

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