/// <summary> /// Import the Data and Make XML mapping files /// </summary> /// <param name="sheetIndex">Sheet Index</param> /// <param name="excel">Excel Object</param> /// <param name="paramString">Param string</param> /// <param name="importCode">Import Code</param> private void ImportCodeListData(int sheetIndex, DIExcel excel, StringBuilder paramString, string importCode) { int StartRowIndex = 4; string SourceGID = string.Empty; string TargetGId = string.Empty; Dictionary<string, string> DictSource = null; Dictionary<string, string> DictTarget = null; int SheetCount = excel.GetWorksheetCount(); int RowCount = excel.GetUsedRange(sheetIndex).RowCount; if (RowCount > StartRowIndex) { excel.ActivateSheet(sheetIndex); DictSource = GenerateDict_Source_Target(importCode, true); DictTarget = GenerateDict_Source_Target(importCode, false); for (int RowIndex = StartRowIndex; RowIndex <= RowCount; RowIndex++) { //Get the Source and Target GIDs SourceGID = excel.GetCellValue(sheetIndex, RowIndex, 1, RowIndex, 1); TargetGId = excel.GetCellValue(sheetIndex, RowIndex, 3, RowIndex, 3); if (!(string.IsNullOrEmpty(SourceGID) || string.IsNullOrEmpty(TargetGId))) { //Check if the mapped GID of Excelsheet lies in the Source Files if (this.IsValidGID(DictSource, DictTarget, SourceGID, TargetGId)) { //Make the parameter string paramString.Append(importCode + Constants.Delimiters.ColumnDelimiter + SourceGID + Constants.Delimiters.ColumnDelimiter + TargetGId + Constants.Delimiters.RowDelimiter); } } } } }