public SSISExcelSource(ExcelSource dbsrc, MainPipe pipe, ConnectionManager cm)
            : base(pipe, "Excel Source")
        {
            // create the oledb source
            //set connection properies
            cm.Name             = "Excel Source Connection Manager";
            cm.ConnectionString = dbsrc.ConnectionString;
            cm.Description      = dbsrc.Description;

            //set connection properties
            //mwrt.IDTSConnectionManagerExcel100 ecm = cm.InnerObject as mwrt.IDTSConnectionManagerExcel100;
            //ecm.ExcelFilePath = dbsrc.FilePath;
            //ecm.FirstRowHasColumnName = dbsrc.Header;
            //ecm.ExcelVersionNumber = mwrt.DTSExcelVersion.DTSExcelVer_2007;

            IDTSComponentMetaData100 comp  = this.MetadataCollection;
            CManagedComponentWrapper dcomp = comp.Instantiate();

            foreach (KeyValuePair <string, object> prop in dbsrc.CustomProperties.CustomPropertyCollection.InnerArrayList)
            {
                dcomp.SetComponentProperty(prop.Key, prop.Value);
            }

            /*Specify the connection manager for Src.The Connections class is a collection of the connection managers that have been added to that package and are available for use at run time*/
            if (comp.RuntimeConnectionCollection.Count > 0)
            {
                comp.RuntimeConnectionCollection[0].ConnectionManagerID = cm.ID;
                comp.RuntimeConnectionCollection[0].ConnectionManager   = DtsConvert.GetExtendedInterface(cm);
            }

            // Finalize
            this.Reinitialize(dcomp);
        }
 public SSISExcelSource(ExcelSource src, MainPipe pipe, ConnectionManager cm, ILogger logger, Application app)
     : base(pipe, "Excel Source", logger, app)
 {
     _src = src;
     _cm  = cm;
 }