Excel File Import Data Issue

Hi All,

I am facing a very weird issue. I have source Excel(.xlsx) file and SQL table Destination. Excel file has 325 records Without any changes in Excel file, if I try to import through BIDS or call this .dtsx package from c# working fine and imported 325 records into SQL Table. However, If I change something in Excel i.e time field change and change font into Red colour, through BIDS if I try to import 325 records into SQL no issue 325 imported successfully. If I try to try to import same modified Excel file through C#, it is not importing those records that I modified in Excel (Modified date and change font color to Red).

Is anyone face this type of issue before? Please advise.

Thank You.

I guess that depends on your C# code. if it's not too long, post the relevant section

C# Code is just call my SSIS Package. The user is selecting the Excel file through UI and hit submit, Once it is submit calling SSIS (.dtsx) package. I am not using any fancy logic in C#.

Then I suppose your C# program is running a different package than the one you run in BIDS, or the calling parameters are different.. The package executor is not able to distinguish how it is launched or alter its behavior depending on the caller.

Good questions, I had the same feeling, What I did, I updated my SSIS Package and Add Count Variable and Email Task. To just to make sure how many records it inserting and calling the same package that is updated. So for sure c# is same package.

Do you (or does anyone) have the spreadsheet open in Excel when you run your package (either method)?

No,If the same Excel source File open SSIS Package will error out.