2

I have an Excel workbook that contains a series of sheets for import into a database. For most of the sheets I'm using a query to get at the data along the lines of:

SELECT [F1], [F2] FROM [Sheet Name$A2:B10000]

In my development I had a workbook with some test data for each sheet. Now someone else is using the package to import a copy of the workbook, but one of the sheets is blank because they don't want any data loaded for that particular table. Unfortunately, when the package tries to run that portion of the import it errors out with a VS_NEEDSNEWMETADATA error.

This can't be a unique problem, but I haven't been able to find any solutions online. Any suggestions on how to get around it?

Tom H
  • 46,766
  • 14
  • 87
  • 128
  • Try setting `ValidateExternalMetadata` to False on the Excel Source connection. Setting `DelayValidation` to True may also help. – digital.aaron Feb 10 '20 at 21:58

1 Answers1

1

In a similar case, I would use a Script Task to check if the Excel sheet contains data, if so, the Data Flow Task is executed (using precedence constraints).

Also, make sure to set the Data Flow Task Delay Validation property to True.

Useful links:

Hadi
  • 36,233
  • 13
  • 65
  • 124