Example #1
0
        public static bool IsSet(IgnoredErrorType errorType, CT_IgnoredError error)
        {
            switch (errorType)
            {
            case IgnoredErrorType.CalculatedColumn:
                return(error.calculatedColumn);

            case IgnoredErrorType.EmptyCellReference:
                return(error.emptyCellReference);

            case IgnoredErrorType.EvaluationError:
                return(error.evalError);

            case IgnoredErrorType.Formula:
                return(error.formula);

            case IgnoredErrorType.FormulaRange:
                return(error.formulaRange);

            case IgnoredErrorType.ListDataValidation:
                return(error.listDataValidation);

            case IgnoredErrorType.NumberStoredAsText:
                return(error.numberStoredAsText);

            case IgnoredErrorType.TwoDigitTextYear:
                return(error.twoDigitTextYear);

            case IgnoredErrorType.UnlockedFormula:
                return(error.unlockedFormula);

            default:
                throw new InvalidOperationException();
            }
        }
Example #2
0
 public static void AddIgnoredErrors(CT_IgnoredError err, String ref1, params IgnoredErrorType[] ignoredErrorTypes)
 {
     err.sqref = ref1;
     foreach (IgnoredErrorType errType in ignoredErrorTypes)
     {
         XSSFIgnoredErrorHelper.Set(errType, err);
     }
 }
Example #3
0
        public static ISet <IgnoredErrorType> GetErrorTypes(CT_IgnoredError err)
        {
            ISet <IgnoredErrorType> result = new HashSet <IgnoredErrorType>();

            foreach (IgnoredErrorType errType in IgnoredErrorTypeValues.Values)
            {
                if (XSSFIgnoredErrorHelper.IsSet(errType, err))
                {
                    result.Add(errType);
                }
            }
            return(result);
        }
Example #4
0
        public static void Set(IgnoredErrorType errorType, CT_IgnoredError error)
        {
            switch (errorType)
            {
            case IgnoredErrorType.CalculatedColumn:
                error.calculatedColumn = true;
                break;

            case IgnoredErrorType.EmptyCellReference:
                error.emptyCellReference = true;
                break;

            case IgnoredErrorType.EvaluationError:
                error.evalError = true;
                break;

            case IgnoredErrorType.Formula:
                error.formula = true;
                break;

            case IgnoredErrorType.FormulaRange:
                error.formulaRange = true;
                break;

            case IgnoredErrorType.ListDataValidation:
                error.listDataValidation = true;
                break;

            case IgnoredErrorType.NumberStoredAsText:
                error.numberStoredAsText = true;
                break;

            case IgnoredErrorType.TwoDigitTextYear:
                error.twoDigitTextYear = true;
                break;

            case IgnoredErrorType.UnlockedFormula:
                error.unlockedFormula = true;
                break;

            default:
                throw new InvalidOperationException();
            }
        }