Spread WPF Documentation
SetText(Int32,Int32,SheetArea,String) Method
Example 


The row index.
The column index.
The sheet area.
The text for the specified cell.
Sets the formatted text in the cell in the specified sheet area using the IFormatter object for the cell.
Syntax
'Declaration
 
Public Overloads Sub SetText( _
   ByVal row As System.Integer, _
   ByVal column As System.Integer, _
   ByVal sheetArea As SheetArea, _
   ByVal text As System.String _
) 
'Usage
 
Dim instance As Worksheet
Dim row As System.Integer
Dim column As System.Integer
Dim sheetArea As SheetArea
Dim text As System.String
 
instance.SetText(row, column, sheetArea, text)
public void SetText( 
   System.int row,
   System.int column,
   SheetArea sheetArea,
   System.string text
)

Parameters

row
The row index.
column
The column index.
sheetArea
The sheet area.
text
The text for the specified cell.
Exceptions
ExceptionDescription
System.ArgumentOutOfRangeException Specified row index is out of range; must be between 0 and the total number of rows.
System.ArgumentOutOfRangeException Specified column index is out of range; must be between 0 and the total number of columns.
Example
This example uses the SetText method.
gcSpreadSheet1.Sheets[0].SetTag(0, 0, "test");
//gcSpreadSheet1.Sheets[0].SetTag(0, 0, GrapeCity.Windows.SpreadSheet.Data.SheetArea.Cells, "test");
gcSpreadSheet1.Sheets[0].SetText(1, 1, "testing");
//gcSpreadSheet1.Sheets[0].SetText(1, 1, GrapeCity.Windows.SpreadSheet.Data.SheetArea.Cells, "Testing");
gcSpreadSheet1.Sheets[0].SetValue(2, 2, "ABC");
//gcSpreadSheet1.Sheets[0].SetValue(2, 2, GrapeCity.Windows.SpreadSheet.Data.SheetArea.Cells, "ABC");
//gcSpreadSheet1.Sheets[0].SetValue(2, 2, GrapeCity.Windows.SpreadSheet.Data.SheetArea.Cells, "ABC", true);
GcSpreadSheet1.Sheets(0).SetTag(0, 0, "test")
'GcSpreadSheet1.Sheets(0).SetTag(0, 0, GrapeCity.Windows.SpreadSheet.Data.SheetArea.Cells, "test")
GcSpreadSheet1.Sheets(0).SetText(1, 1, "testing")
'GcSpreadSheet1.Sheets(0).SetText(1, 1, GrapeCity.Windows.SpreadSheet.Data.SheetArea.Cells, "Testing")
GcSpreadSheet1.Sheets(0).SetValue(2, 2, "ABC")
'GcSpreadSheet1.Sheets(0).SetValue(2, 2, GrapeCity.Windows.SpreadSheet.Data.SheetArea.Cells, "ABC")
'GcSpreadSheet1.Sheets(0).SetValue(2, 2, GrapeCity.Windows.SpreadSheet.Data.SheetArea.Cells, "ABC", True)
Requirements

Target Platforms: Windows 7, Windows 8 Desktop, Windows Vista SP1 or later, Windows Server 2000, Windows 2000 Professional (SP4), Windows XP (SP2), Windows 2008, Windows 2003 Server (SP1)

See Also

Reference

Worksheet Class
Worksheet Members
Overload List

 

 


Copyright © GrapeCity, inc. All rights reserved.