SSIS Package - detect if Excel is empty

  • Hi,

    I have a SSIS Package that imports data from Excel into a database. Also, in SSMS i have a job that runs the package every 24 hours. The job fails when the Excel is empty ( It can be empty because it contains the updated records from a Share Point list, but for example in weekend the data is not updated).

    How can i detect if the Excel file is empty or not? And if it's empty, to stop the running of the package, and if it's not empty to continue importing the data?

    Any ideas?

    Thank you!

  • Hi

    My package uploads documents (pdf) into repository, sometimes files are empty, so I check the size of

    file thru the Script Task to exclude them from import . Please refer FileInfo Class https://msdn.microsoft.com/en-us/library/system.io.fileinfo%28v=vs.110%29.aspx

    Regards

    Mike

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

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