Example #1
0
        public static bool IsCellRange(string match)
        {
            bool  flag1  = false;
            Match match1 = AreaFormulaToken.IsCellRangeRegex.Match(match);

            if (match1.Success)
            {
                flag1 = RefFormulaToken.IsColumnValid(match1.Groups["Column1"].Value);
                flag1 = flag1 ? RefFormulaToken.IsColumnValid(match1.Groups["Column2"].Value) : flag1;
            }
            return(flag1);
        }
Example #2
0
        private static bool IsValidCell(Match regexMatch)
        {
            string text1 = regexMatch.Groups["Row"].Value;

            if (text1[0] == RefFormulaToken.AbsoluteCellMark)
            {
                text1 = text1.Remove(0, 1);
            }
            string text2 = regexMatch.Groups["Column"].Value;

            if (text2[0] == RefFormulaToken.AbsoluteCellMark)
            {
                text2 = text2.Remove(0, 1);
            }
            if (RefFormulaToken.IsColumnValid(ExcelColumnCollection.ColumnNameToIndex(text2)))
            {
                return(RefFormulaToken.IsRowValid(ExcelRowCollection.RowNameToIndex(text1)));
            }
            return(false);
        }