private JObject ConvertExcelRowDataToJson(Worksheet worksheet, ExcelRange excelCellRange, List <string> titles, int rowIndex) { JObject jObject = new JObject(); jObject.AddStatusColumns(); bool isAllPropertyNull = true; int cellIndex = 1; jObject.Add("RowNumber", rowIndex); foreach (var title in titles) { var dataCell = excelCellRange[rowIndex, cellIndex]; var cellValue = dataCell.Value; if (title != null) { string name = worksheet.Columns .Where(e => e.Title == title) .Select(e => e.Name) .FirstOrDefault(); jObject.Add(name, cellValue == null ? "" : cellValue.ToString()); isAllPropertyNull = isAllPropertyNull && cellValue == null; } cellIndex++; } return(isAllPropertyNull ? null : jObject); }