问题1,你可以使用TextCellType或者RichTetCellType来实现在单元格中通过Enter进行换行:
- FarPoint.Win.Spread.CellType.RichTextCellType rtct = new FarPoint.Win.Spread.CellType.RichTextCellType();
- rtct.Multiline = true;
- rtct.WordWrap = true;
- fpSpread1.ActiveSheet.Columns[0].CellType = rtct;
- FarPoint.Win.Spread.CellType.TextCellType tct = new FarPoint.Win.Spread.CellType.TextCellType();
- tct.Multiline = true;
- tct.WordWrap = true;
- fpSpread1.ActiveSheet.Columns[1].CellType = tct;
- fpSpread1.ActiveSheet.AddSpanCell(0, 0, 2, 1);
复制代码
问题2:Spread没有提供对合并单元格进行计算行高的方法,GetPreferredHeight方法不适用与有合并行的情况。 |