fpspreadsheet合并单元格、撤消单元格合并的方法记录如下:
WorksheetGrid.MergeCells(1,1,3,2); //(列,行,列,行) WorksheetGrid.Cells[1,1]:='合并测试'; WorksheetGrid.HorAlignment[1,1] := haCenter; WorksheetGrid.VertAlignment[1,1] := vaCenter;
取消单元格合并:
WorksheetGrid.UnmergeCells(1,1);