Source

main / Source / Excel / Excel.BizLogic / Managers / MetadataManager.cs

Diff from to

Source/Excel/Excel.BizLogic/Managers/MetadataManager.cs

             return obj;
         }
 
+        public string ActiveSheetName(Range range)
+        {
+            return range.Worksheet.Name;
+            
+        }
+
         /// <summary>
         /// This function can be used to get the details of the parameter metadata.
         /// </summary>
         /// Updates the parameter metadata.
         /// </summary>
         /// <param name="metadata">parameter metadata Detail List.</param>
-        public void UpdateParaMetadata(List<object> parametadata)
+        public void UpdateParaMetadata(List<object> parametadata, string sheetName=null)
         {
             List<object> list = new List<object>();
             _Worksheet metadataSheet = this.Workbook.XLGetMetadataWorksheet();
                     {
                         paramterMetadata.Add(new ParameterDetail()
                             {
+                                EntityName = sheetName,
                                 Name = item.ToString().Trim()
                             });
                     }
                     {
                         paramterMetadata.Add(new ParameterDetail()
                         {
-                            Name = obj.Range.Cells[rCnt, 1].Value != null ? obj.Range.Cells[rCnt, 1].Value.ToString().Trim() : string.Empty,
-                            Description = obj.Range.Cells[rCnt, 2].Value != null ? obj.Range.Cells[rCnt, 2].Value.ToString() : string.Empty,
-                            Type = obj.Range.Cells[rCnt, 3].Value != null ? obj.Range.Cells[rCnt, 3].Value.ToString() : string.Empty,
-                            Units = obj.Range.Cells[rCnt, 4].Value != null ? obj.Range.Cells[rCnt, 4].Value.ToString() : string.Empty,
+                            EntityName = obj.Range.Cells[rCnt, 1].Value != null ? obj.Range.Cells[rCnt, 1].Value.ToString().Trim() : string.Empty,
+                            EntityDescription = obj.Range.Cells[rCnt, 2].Value != null ? obj.Range.Cells[rCnt, 2].Value.ToString() : string.Empty,
+                            Name = obj.Range.Cells[rCnt, 3].Value != null ? obj.Range.Cells[rCnt, 3].Value.ToString().Trim() : string.Empty,
+                            Description = obj.Range.Cells[rCnt, 4].Value != null ? obj.Range.Cells[rCnt, 4].Value.ToString() : string.Empty,
+                            Type = obj.Range.Cells[rCnt, 5].Value != null ? obj.Range.Cells[rCnt, 5].Value.ToString() : string.Empty,
+                            Units = obj.Range.Cells[rCnt, 6].Value != null ? obj.Range.Cells[rCnt, 6].Value.ToString() : string.Empty,
                         });
                     }
                 }