本帖最后由 lgxl6925 于 2022-2-10 11:55 编辑
看了前面的示例:- FarPoint.Web.Spread.TextCellType t = new FarPoint.Web.Spread.TextCellType();
- string s = "This is a test\r\nfor multiline";
- t.Multiline = true;
- FpSpread1.ActiveSheetView.Cells[0, 0].CellType = t;
- FpSpread1.ActiveSheetView.SetText(0, 0, s);
可以换行显示,
换成这样的:
FpSpread1.DataSource = ds.Tables["zfkp"];
FarPoint.Web.Spread.TextCellType t = new FarPoint.Web.Spread.TextCellType();
t.Multiline = true;
FpSpread1.ActiveSheetView.Cells[0, 3].CellType = t;
ds.Tables["zfkp"]对应行列的值包含有\r\n的
|