Exemple #1
0
        public static (int Column, int Row)? TranslateCell(this System.Data.DataTable table, string cell)
        {
            ArgumentGuards.GuardAgainstNullCell(cell);

            var tuple = CellIndex.Translate(cell, Offset.ZeroBased);

            if (!table.Contains(tuple))
            {
                return(null);
            }

            return(tuple);
        }
Exemple #2
0
        public static ((int Column, int Row), (int Column, int Row))? TranslateRange(this System.Data.DataTable table, string range)
        {
            ArgumentGuards.GuardAgainstNullRange(range);

            range = TranslateUnknown(table, range);

            var tuple = CellRange.Translate(range, Offset.ZeroBased);

            if (!table.Contains(tuple))
            {
                return(null);
            }

            return(tuple);
        }