-2

我使用 Farpoint Spread 版本 5.0.3514.2008。(Visual Studio 2015,.Net 4.0,C#)

我想在展开单元格中输入长文本。

但是当字符串长度大于 15153 时,sheet(Cell) 就不能正常显示数据。

我没有设置多行属性。

当字符串长度 15153

当字符串长度 15154

4

1 回答 1

0
FarPoint.Win.Spread.CellType.TextCellType tcell = new FarPoint.Win.Spread.CellType.TextCellType();

 tcell.CharacterCasing = CharacterCasing.Upper; tcell.CharacterSet = FarPoint.Win.Spread.CellType.CharacterSet.Ascii; tcell.MaxLength = 30; tcell.Multiline = true; fpSpread1.ActiveSheet.Cells[0, 0].Text = "This is a text cell. "; 

 fpSpread1.ActiveSheet.Cells[0, 0].CellType = tcell;

使用代码

  • 通过创建 TextCellType 类的实例来定义文本单元格。
  • 创建一条消息以在条目无效时向用户显示

  • 通过将单元格、列、行或样式的 CellType 属性设置为 TextCellType 对象,将文本单元格类型分配给一个单元格或单元格区域。

于 2020-02-14T09:51:13.007 回答