Warning: file_get_contents(/data/phpspider/zhask/data//catemap/3/templates/2.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
C# 在电子表格单元格中写入文本_C#_Farpoint Spread - Fatal编程技术网

C# 在电子表格单元格中写入文本

C# 在电子表格单元格中写入文本,c#,farpoint-spread,C#,Farpoint Spread,我使用Farpoint Spread版本5.0.3514.2008(Visual Studio 2015、.Net 4.0、C#) 我想把长文本输入扩展单元格 但当字符串长度大于15153时,工作表(单元格)无法正常显示数据 我没有设置多行属性 使用代码 通过创建TextCellType的实例来定义文本单元格 班级 创建一条消息,在条目不可用时显示给用户 有效 通过将单元格、列、行或样式的CellType属性设置为TextCellType对象,将文本单元格类型指定给单元格或单元格范围 我实

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

我想把长文本输入扩展单元格

但当字符串长度大于15153时,工作表(单元格)无法正常显示数据

我没有设置多行属性

使用代码

  • 通过创建TextCellType的实例来定义文本单元格 班级
  • 创建一条消息,在条目不可用时显示给用户
    有效

  • 通过将单元格、列、行或样式的CellType属性设置为TextCellType对象,将文本单元格类型指定给单元格或单元格范围


我实现了您的代码,但sheet仍然存在相同的问题。。。
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;