示例#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();
            }
        }
示例#2
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();
            }
        }