Check whether the column width is too small (cell displayed as '########') lazarus / 49-FPSpreadsheet ---------------------------------------------------------------------- kjteng · 2019-11-23 08:16 I want to check (programmatically) whether a specific cell is displayed as '######' (column width too small) . Is there an easy way to do this? ---------------------------------------------------------------------- wp · 2019-11-23 10:13 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: Code: Pascal  [Select][+][-]window.onload = function(){var x1 = document.getElementById("main_content_section"); if (x1) { var x = document.getElementsByClassName("geshi");for (var i = 0; i 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; ---------------------------------------------------------------------- kjteng · 2019-11-24 12:34 Thanks master.  TrimToCell works for me. BTW I noticed that the protected functions can only called in the specific way (i.e. typecast to TMyWorksheetGrid) but TsWorksheetGrid(sWorksheetGrid1).TrimToCell(ACell) would not compile.  May I know what is the reason?