FarPoint.Web.Spread Assembly > FarPoint.Web.Spread Namespace > Cell Class : Text Property |
This property gets or sets the formatted data in a cell using the IFormatter object for that cell to do the parsing. If setting the text, the data handled with this property is placed in the data model after it is parsed; if getting the text, the data is retrieved from the data model and parsed using the formatter.
Besides using this property, you can get or set the text in a cell using several methods available at the sheet level (with the SheetView object). For more information, see Handling Data Using Sheet Methods.
Remember that the data may be displayed differently in a cell depending on the cell type. For more information, see Understanding Cell Type Effects on Displaying Data. Compare the values returned from the Text property with the values returned from the Value property. For example, for date-time cells, the Text property returns the formatted date and time value; the Value property returns a DateTime object for the date and time.
FarPoint.Web.Spread.Cell mycell; FarPoint.Web.Spread.Inset margin = new FarPoint.Web.Spread.Inset(20,40,50,20); mycell = FpSpread1.Cells[0,0]; mycell.Text="Note Test"; mycell.Locked=true; mycell.Margin=margin; mycell.Note="This is the Note"; FpSpread1.ActiveSheetView.Rows[0].Height=80;
Dim mycell As FarPoint.Web.Spread.Cell Dim margin As New FarPoint.Web.Spread.Inset(20,40,50,20) mycell=FpSpread1.Cells(0,0) mycell.Text="Note Test" mycell.Locked=True mycell.Margin=margin mycell.Note="This is the Note" FpSpread1.ActiveSheetView.Rows(0).Height=80
Target Platforms: Windows 7, Windows 8, Windows 10, Windows Vista, Windows Server 2003, Windows Server 2008, Windows Server 2012, Windows XP Professional