可以看看ttf16帮助文件。
procedure TfrmReport.JoinCell(startRow, startCol, endRow, endCol: integer);
var
cellformat : F1CellFormat;
begin
with F2Book1do
begin
cellformat:=F2Book1.CreateNewCellFormat;
SetSelection(startRow,startCol,endRow,endCol);
cellformat.MergeCells:=true;
F2Book1.SetCellFormat(cellformat);
// F2Book1.SetSelection(nstartRow,nstartCol,nstartRow,nstartCol);
end;
end;
//设置报表的页眉和表头宽度,并合并单元格
JoinCell(1,1,1,nCol);
JoinCell(2,1,3,nCol);
JoinCell(3,1,3,nCol);