FormulaPointing
public static class FormulaPointing
Namespace SharpCell.Grid · package SharpCell.Grid
Picking references with the mouse while a formula is typed, as in Excel: where the caret takes one, and how a picked cell or range is written.
Methods
CanPoint(string, int)
public static bool CanPoint(string text, int caret)
Whether a click on a cell puts a reference at the caret rather than entering the text: the text is a formula and the caret, past any spaces, follows =, an opening bracket, a comma or an operator, outside quoted text.
Parameters
text: The text being typed.caret: Where the caret is, from 0.
Reference(CellArea, Worksheet, Worksheet)
public static string Reference(CellArea area, Worksheet? sheet, Worksheet? formulaSheet)
The reference a formula takes for cells picked on a sheet: B3, B3:C5, whole columns C:D or rows 2:2, with the sheet's name in front when they are on another sheet than the formula's.
Parameters
area: The cells picked.sheet: The sheet they are on.formulaSheet: The sheet of the cell being edited.