Ejemplo n.º 1
0
 private static bool CellHasSpecialCharacters(SheetCell cell)
 {
     bool hasSpecialCharacters = false;
     if (regkey.IsMatch(cell.Value))
     {
         hasSpecialCharacters = true;
     }
     return hasSpecialCharacters;
 }
Ejemplo n.º 2
0
        private static bool CellHasStyleErrors(SheetCell cell, Dictionary<int, CellFormat> sharedFormatList)
        {
            bool hasStyleError = false;
            if (cell.ExcelCell.StyleIndex == null)
            {
                return hasStyleError;
            }

            if (cell.ExcelCell.CellValue == null && cell.ExcelCell.StyleIndex == 0)
            {
                hasStyleError = true;
            }
            else if (cell.ExcelCell.CellValue != null || cell.ExcelCell.StyleIndex >= 0)
            {
                CellFormat cellformate = sharedFormatList[Convert.ToInt32(cell.ExcelCell.StyleIndex.Value)];

                if ((cellformate.FontId != null && cellformate.FontId > 0 && cell.ExcelCell.DataType != null) ||
                                            (cellformate.FillId != null && cellformate.FillId > 0))
                {
                    hasStyleError = true;
                }
            }

            return hasStyleError;
        }
Ejemplo n.º 3
0
 private static bool CellHasCommas(SheetCell cell)
 {
     bool hasCommas = false;
     if (!string.IsNullOrWhiteSpace(cell.Value.ToString()) && cell.Value.Contains(','))
     {
         hasCommas = true;
     }
     return hasCommas;
 }