I am trying to import data from an excel spreadsheet. The file comes from a client and sometimes it may not have any data, that is, it will be blank. It seems that the Excel Source in SSIS does not like empty files, is there any way around this? I suppose I can check to see if it is empty and abort the import process but I am not sure how to do this. Any other ideas on how to get around this?
you could have the package fail if the excel file is empty. in other words, you would first check the contents of the excel file, then determine how the package should proceed based whether the contents is empty or not. you could use the script task to check the contents of the excel file.|||mthierauf wrote: Any other ideas on how to get around this?
Thanks Duane... I was trying to do that but wasn't sure how to check for an empty excel file. I assume you would do this in a script but I am not sure what function does this. I may not even need to do this now anyway, our client is going to put a header row in the file... but I would still appreciate the code to check for an empty excel file.
|||did you ask this question on the visual studio tools for office forum?mthierauf wrote: Thanks Duane... I was trying to do that but wasn't sure how to check for an empty excel file. I assume you would do this in a script but I am not sure what function does this. I may not even need to do this now anyway, our client is going to put a header row in the file... but I would still appreciate the code to check for an empty excel file.
No comments:
Post a Comment