Write text on spreadsheet cell

771 Views Asked by At

I use Farpoint Spread Version 5.0.3514.2008.(Visual Studio 2015, .Net 4.0, C#)

And I want to input long text into spread cell.

But when string length is larger than 15153 then the sheet(Cell) can't show data normally.

I didn't set-up MultiLine Properties.

When String Length 15153

When String Length 15154

1

There are 1 best solutions below

1
On
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;

Using Code

  • Define the text cell by creating an instance of the TextCellType class.
  • Create a message to display to the user when the entry is not
    valid.

  • Assign the text cell type to a cell or range of cells by set ting the CellType property for a cell, column, row, or style to the TextCellType object.