There is no built-in routine for that. You must check it yourself. The # characters appear when
- the column width is less than the length of the text, and
- the cell does not contain a string (cell^.ContentType <> cctUTF8String), and
- the number format is not nfGeneral
Or maybe like this:
type
TMyWorksheetGrid = class(TsWorksheetGrid);
function TForm1.HashMarkedCell(ACell: PCell): Boolean;
var
s1, s2: String;
begin
Result := false;
if ACell = nil then exit;
s1 := sWorksheetGrid1.Worksheet.ReadAsText(ACell);
s2 := TMyWorksheetGrid(sWorksheetGrid1).TrimToCell(ACell);
Result := (s1 <> s2) and (s2[1] = '#');
end;