a new component (TsWorksheetHeader) for TsWorksheetGrid lazarus / 49-FPSpreadsheet ---------------------------------------------------------------------- abcthing · 2020-08-28 05:55 Click the header to pop up the menu, give a name to the column or row, then according to the column name and row name for batch modify cells. This component is implemented based on the ongetrowheadertext and ongetcolheadertext interfaces. function: 1.Realize mark of header with popup menu. 2.Save marks of header to file; 3.Load marks of header from file; 4.can prohibit duplicate mark 5.Can hide  marked popup menu item. demo: 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 var  fRowIndex, fColIndex: integer;  fRow, fCol: integer;  fcell: PCell;   ...begin  for fRowIndex:=0 to LxmHeaders1.RowHeaderItems.Count-1 do  begin    fRow := ExcelRow2Fps(StrToInt(LxmHeaders1.RowHeaderItems.Names[fRowIndex]));  fItem := LxmHeaders1.RowHeaderItems.ValueFromIndex[fRowIndex];     for fColIndex:=0 to LxmHeaders1.ColumnHeaderItems.Count-1 do    begin      fCol := ExcelCol2Fps(LxmHeaders1.ColumnHeaderItems.Names[fColIndex]);      fType := LxmHeaders1.ColumnHeaderItems.ValueFromIndex[fColIndex];     tm1function := GenDataTm1Function(fTm1, fCompany, fMonth, fItem, fType);      sWorksheetGrid2.Worksheet.WriteFormula(fRow, fCol, tm1function);       fcell := sWorksheetGrid2.worksheet.FindCell(fRow, fCol);      sWorksheetGrid2.worksheet.WriteCellProtection(fcell, []);    end;  end;end; ---------------------------------------------------------------------- wp · 2020-08-28 11:31 Thanks for the idea. It is good that the component is completely separated; therefore it can be used freely. However, I will not include it in flspreadsheet because I think that most users do not need this, and for providing user-specified column and row headers there are already events OnGetColHeaderText and OnGetRowHeaderText